-
Notifications
You must be signed in to change notification settings - Fork 580
Open
Description
My server is Artemis 2.16, and js code is:
<script>
$(document).ready(function() {
let client = Stomp.client("ws://127.0.0.1:61613");
// this allows to display debug logs directly on the web page
client.debug = function (str) {
console.log(str);
};
// the client is notified when it is connected to the server.
// let headers = {"ack": "client", "selector": "location = 'Europe'"};
let connected = function(frame) {
client.subscribe("/test", function(message) {
$("#messages").append("<p>" + message.body + "</p>\n");
}, {"durable-subscription-name": "filter", "selector": "tag = 'aaa'"});
};
client.connect({"client-id": "abc"}, connected);
});
</script>
but the setting of selector is ineffective (connection and subscribe is correct), the client can receive message with other tags, such as bbb . The debug output is:
>>> CONNECT
client-id:abc
accept-version:1.1,1.0
heart-beat:10000,10000
�
--- got data length: 130
<<< CONNECTED
version:1.1
session:6481f7fd
server:ActiveMQ-Artemis/2.16.0 ActiveMQ Artemis Messaging Engine
heart-beat:10000,10000
�
connected to server ActiveMQ-Artemis/2.16.0 ActiveMQ Artemis Messaging Engine
send PING every 10000ms
check PONG every 10000ms
>>> SUBSCRIBE
durable-subscription-name:filter
selector:tag = 'aaa'
id:sub-0
destination:/test
�
--- got data length: 256
<<< MESSAGE
subscription:sub-0
message-id:630
destination:test\c\cabc.filter
expires:0
redelivered:false
priority:4
persistent:true
timestamp:1611740949751
destination-type:ANYCAST
__AMQ_CID:e7417bfc-6084-11eb-b8bd-3cf011abac25
tag:bbb
content-length:4
MSG0�
Why???
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels