You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.
If the Stomp client tries to subscribe to a queue with a (mismatching) x-dead-letter-exchange set, the broker immediately closes the socket connection.
However, if the Stomp client tries to subscribe to a queue with a (mismatching) x-max-priority set, the broker sends a Stomp error frame back to the client with the error description, and does not close the connection.
I suggest to treat the first error situation in the same way, which allows to see the error message on the client side in the Stomp error frame in both cases.
Here is a broker log which shows the different server reactions to the mismatching queue args:
=ERROR REPORT==== 12-Jun-2015::11:37:01 ===
Channel error on connection <0.4321.0> (127.0.0.1:49446 -> 127.0.0.1:61613, vhost: '/', user: 'guest'), channel 1:
{amqp_error,precondition_failed,
"inequivalent arg 'x-max-priority' for queue 'priority_queue' in vhost '/': received none but current is the value '9' of type 'long'",
'queue.declare'}
=ERROR REPORT==== 12-Jun-2015::11:37:01 ===
STOMP error frame sent:
Message: precondition_failed
Detail: "PRECONDITION_FAILED - inequivalent arg 'x-max-priority' for queue 'priority_queue' in vhost '/': received none but current is the value '9' of type 'long'\n"
Server private detail: none
=ERROR REPORT==== 12-Jun-2015::11:37:13 ===
Channel error on connection <0.4341.0> (127.0.0.1:49447 -> 127.0.0.1:61613, vhost: '/', user: 'guest'), channel 1:
{amqp_error,precondition_failed,
"inequivalent arg 'x-dead-letter-exchange' for queue 'queue_with_dlx' in vhost '/': received none but current is the value 'dlx.exchange.name' of type 'longstr'",
'queue.declare'}
=ERROR REPORT==== 12-Jun-2015::11:37:13 ===
** Generic server <0.4337.0> terminating
** Last message in was {'EXIT',<0.4347.0>,
{shutdown,
{server_initiated_close,406,
<<"PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'queue_with_dlx' in vhost '/': received none but current is the value 'dlx.exchange.name' of type 'longstr'">>}}}
** When Server state == {state,"session-gfjnKs0tYwZu-ZqDNSSYbw",<0.4347.0>,
<0.4341.0>,
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
"1.2",#Fun<rabbit_stomp_reader.1.50399846>,
undefined,
{stomp_configuration,"guest","guest",false,false},
{set,1,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],
[<<"queue_with_dlx">>],
[],[],[],[]}}},
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
#Fun<rabbit_stomp_processor.5.63782375>,
{amqp_adapter_info,
{127,0,0,1},
61613,
{127,0,0,1},
49447,
<<"127.0.0.1:49447 -> 127.0.0.1:61613">>,
{'STOMP',0},
[{ssl,false}]},
#Fun<rabbit_stomp_reader.0.22944995>,none,
{127,0,0,1}}
** Reason for termination ==
** {channel_died,
{shutdown,
{server_initiated_close,406,
<<"PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'queue_with_dlx' in vhost '/': received none but current is the value 'dlx.exchange.name' of type 'longstr'">>}}}
If the Stomp client tries to subscribe to a queue with a (mismatching) x-dead-letter-exchange set, the broker immediately closes the socket connection.
However, if the Stomp client tries to subscribe to a queue with a (mismatching) x-max-priority set, the broker sends a Stomp error frame back to the client with the error description, and does not close the connection.
I suggest to treat the first error situation in the same way, which allows to see the error message on the client side in the Stomp error frame in both cases.
Here is a broker log which shows the different server reactions to the mismatching queue args:
=ERROR REPORT==== 12-Jun-2015::11:37:01 ===
Channel error on connection <0.4321.0> (127.0.0.1:49446 -> 127.0.0.1:61613, vhost: '/', user: 'guest'), channel 1:
{amqp_error,precondition_failed,
"inequivalent arg 'x-max-priority' for queue 'priority_queue' in vhost '/': received none but current is the value '9' of type 'long'",
'queue.declare'}
=ERROR REPORT==== 12-Jun-2015::11:37:01 ===
STOMP error frame sent:
Message: precondition_failed
Detail: "PRECONDITION_FAILED - inequivalent arg 'x-max-priority' for queue 'priority_queue' in vhost '/': received none but current is the value '9' of type 'long'\n"
Server private detail: none
=INFO REPORT==== 12-Jun-2015::11:37:01 ===
closing STOMP connection <0.4318.0> (127.0.0.1:49446 -> 127.0.0.1:61613)
=INFO REPORT==== 12-Jun-2015::11:37:13 ===
accepting STOMP connection <0.4338.0> (127.0.0.1:49447 -> 127.0.0.1:61613)
=ERROR REPORT==== 12-Jun-2015::11:37:13 ===
Channel error on connection <0.4341.0> (127.0.0.1:49447 -> 127.0.0.1:61613, vhost: '/', user: 'guest'), channel 1:
{amqp_error,precondition_failed,
"inequivalent arg 'x-dead-letter-exchange' for queue 'queue_with_dlx' in vhost '/': received none but current is the value 'dlx.exchange.name' of type 'longstr'",
'queue.declare'}
=ERROR REPORT==== 12-Jun-2015::11:37:13 ===
** Generic server <0.4337.0> terminating
** Last message in was {'EXIT',<0.4347.0>,
{shutdown,
{server_initiated_close,406,
<<"PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'queue_with_dlx' in vhost '/': received none but current is the value 'dlx.exchange.name' of type 'longstr'">>}}}
** When Server state == {state,"session-gfjnKs0tYwZu-ZqDNSSYbw",<0.4347.0>,
<0.4341.0>,
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
"1.2",#Fun<rabbit_stomp_reader.1.50399846>,
undefined,
{stomp_configuration,"guest","guest",false,false},
{set,1,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],
[<<"queue_with_dlx">>],
[],[],[],[]}}},
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[],[]}}},
#Fun<rabbit_stomp_processor.5.63782375>,
{amqp_adapter_info,
{127,0,0,1},
61613,
{127,0,0,1},
49447,
<<"127.0.0.1:49447 -> 127.0.0.1:61613">>,
{'STOMP',0},
[{ssl,false}]},
#Fun<rabbit_stomp_reader.0.22944995>,none,
{127,0,0,1}}
** Reason for termination ==
** {channel_died,
{shutdown,
{server_initiated_close,406,
<<"PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'queue_with_dlx' in vhost '/': received none but current is the value 'dlx.exchange.name' of type 'longstr'">>}}}
=INFO REPORT==== 12-Jun-2015::11:37:13 ===
closing STOMP connection <0.4338.0> (127.0.0.1:49447 -> 127.0.0.1:61613)
The text was updated successfully, but these errors were encountered: