Cannot create custom exchange x-jms-topic

228 views
Skip to first unread message

ksenya muratova

unread,
Sep 9, 2016, 9:03:26 AM9/9/16
to rabbitmq-users
After enabling rabbitmq_jms_topic_exchange, I cannot create x-jms-exchange, get an error from web-interface:
Got response code 500 with body {"error":"Internal Server Error","reason":"{error,\n {exit,\n {{{error,\n {amqp_error,internal_error,\n \"client version 'pre-1.2.0' incompatible with plugin for operation on exchange named '1212'\",\n none}},\n [{rabbit_misc,execute_mnesia_transaction,1,\n [{file,\"src/rabbit_misc.erl\"},{line,553}]},\n {rabbit_misc,execute_mnesia_transaction,2,\n [{file,\"src/rabbit_misc.erl\"},{line,563}]},\n {rabbit_channel,handle_method,3,\n [{file,\"src/rabbit_channel.erl\"},{line,1213}]},\n {rabbit_channel,handle_cast,2,\n [{file,\"src/rabbit_channel.erl\"},{line,457}]},\n {gen_server2,handle_msg,2,\n [{file,\"src/gen_server2.erl\"},{line,1032}]},\n {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,239}]}]},\n {gen_server,call,\n [<0.8964.0>,\n {call,\n {'exchange.declare',0,<<\"1212\">>,<<\"x-jms-topic\">>,false,\n true,false,false,false,[]},\n none,<0.1818.0>},\n infinity]}},\n [{gen_server,call,3,[{file,\"gen_server.erl\"},{line,188}]},\n {rabbit_mgmt_util,'-amqp_request/5-fun-0-',4,\n [{file,\"src/rabbit_mgmt_util.erl\"},{line,585}]},\n {rabbit_mgmt_util,with_channel,5,\n [{file,\"src/rabbit_mgmt_util.erl\"},{line,604}]},\n {rabbit_mgmt_util,http_to_amqp,5,\n [{file,\"src/rabbit_mgmt_util.erl\"},{line,532}]},\n {webmachine_resource,resource_call,3,\n [{file,\"src/webmachine_resource.erl\"},{line,186}]},\n {webmachine_resource,do,3,\n [{file,\"src/webmachine_resource.erl\"},{line,142}]},\n {webmachine_decision_core,resource_call,1,\n [{file,\"src/webmachine_decision_core.erl\"},{line,48}]},\n {webmachine_decision_core,accept_helper,1,\n [{file,\"src/webmachine_decision_core.erl\"},{line,612}]}]}}\n"}

the error message when trying to create exchange from pika-client:
pika.exceptions.ConnectionClosed: (541, 'INTERNAL_ERROR')

Can anybody explain what is the reason of this error?

Thanks in advance.

Michael Klishin

unread,
Sep 9, 2016, 9:12:54 AM9/9/16
to rabbitm...@googlegroups.com
JMS client version you use is incompatible with the plugin.

If you use commercial RabbitMQ 3.5.x versions, those ship with a client library,
otherwise the 1.5.0 release of [1] should work with RabbitMQ 3.6.3 or later.


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

ksenya muratova

unread,
Sep 9, 2016, 11:20:13 AM9/9/16
to rabbitmq-users
Thanks, Michael!

I followed the instruction in [1]. Almost all tests passed. But I still get the same error when creating x-jms-exchange. 

пятница, 9 сентября 2016 г., 16:12:54 UTC+3 пользователь Michael Klishin написал:
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Sep 9, 2016, 11:24:19 AM9/9/16
to rabbitm...@googlegroups.com
Can you please provide more details about what exactly you run? It could be a leftover version check from the commercial version.

ksenya muratova

unread,
Sep 9, 2016, 11:36:23 AM9/9/16
to rabbitmq-users
I installed rabbit "Using rabbitmq.com APT Repository" https://www.rabbitmq.com/install-debian.html

Output of status command is:
Status of node rabbit@Ubuntu ...
[{pid,12366},
 {running_applications,
     [{rabbitmq_management,"RabbitMQ Management Console","3.6.5"},
      {rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.6.5"},
      {webmachine,"webmachine","1.10.3"},
      {mochiweb,"MochiMedia Web Server","2.13.1"},
      {rabbitmq_management_agent,"RabbitMQ Management Agent","3.6.5"},
      {rabbitmq_jms_topic_exchange,
          "RabbitMQ JMS topic selector exchange plugin","3.6.5"},
      {rabbit,"RabbitMQ","3.6.5"},
      {os_mon,"CPO  CXC 138 46","2.2.14"},
      {amqp_client,"RabbitMQ AMQP Client","3.6.5"},
      {rabbit_common,[],"3.6.5"},
      {mnesia,"MNESIA  CXC 138 12","4.11"},
      {inets,"INETS  CXC 138 49","5.9.7"},
      {ranch,"Socket acceptor pool for TCP protocols.","1.2.1"},
      {compiler,"ERTS  CXC 138 10","4.9.4"},
      {syntax_tools,"Syntax tools","1.6.12"},
      {ssl,"Erlang/OTP SSL application","5.3.2"},
      {public_key,"Public key infrastructure","0.21"},
      {asn1,"The Erlang ASN1 compiler version 2.0.4","2.0.4"},
      {crypto,"CRYPTO version 2","3.2"},
      {xmerl,"XML parser","1.3.5"},
      {sasl,"SASL  CXC 138 11","2.3.4"},
      {stdlib,"ERTS  CXC 138 10","1.19.4"},
      {kernel,"ERTS  CXC 138 10","2.16.4"}]},
 {os,{unix,linux}},
 {erlang_version,
     "Erlang R16B03 (erts-5.10.4) [source] [64-bit] [async-threads:64] [kernel-poll:true]\n"},
 {memory,
     [{total,55327552},
      {connection_readers,0},
      {connection_writers,0},
      {connection_channels,0},
      {connection_other,2632},
      {queue_procs,383112},
      {queue_slave_procs,0},
      {plugins,657008},
      {other_proc,18425416},
      {mnesia,142792},
      {mgmt_db,776800},
      {msg_index,79632},
      {other_ets,1452256},
      {binary,812880},
      {code,27201962},
      {atom,992409},
      {other_system,4400653}]},
 {alarms,[]},
 {listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
 {vm_memory_high_watermark,0.4},
 {vm_memory_limit,839722598},
 {disk_free_limit,50000000},
 {disk_free,11741429760},
 {file_descriptors,
     [{total_limit,924},{total_used,3},{sockets_limit,829},{sockets_used,0}]},
 {processes,[{limit,1048576},{used,272}]},
 {run_queue,0},
 {uptime,1256},
 {kernel,{net_ticktime,60}}]


пятница, 9 сентября 2016 г., 18:24:19 UTC+3 пользователь Michael Klishin написал:

ksenya muratova

unread,
Sep 12, 2016, 9:11:03 AM9/12/16
to rabbitmq-users
I looked through code of jms-plugin[1] and it contains test of jms-topic-exchange creation? Is this plugin not enough to just create such an exchange?

When I install jms-java-client should it be seen somewhere in rabbitmq-server configuration?


пятница, 9 сентября 2016 г., 16:12:54 UTC+3 пользователь Michael Klishin написал:
JMS client version you use is incompatible with the plugin.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Sep 12, 2016, 9:40:14 AM9/12/16
to rabbitm...@googlegroups.com
Ksenya,

The fact that there are tests that use the exchange type provided by that plugin is exactly
why I asked for a transcript of what you are trying to do. A server installation log is not enough.

RabbitMQ server has no knowledge of client libraries used so however you "install" the client
it won't be "seen" anywhere in the server output but you can list connections (regardless of the client).

So, what *exactly* are you doing when you hit this problem?


To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

ksenya muratova

unread,
Sep 12, 2016, 10:39:55 AM9/12/16
to rabbitmq-users
I try to create x-jms-topic exchange from  RabbitMQ Management web GUI.


When I hit Add exchange I get en error as in the screenshot bellow.


понедельник, 12 сентября 2016 г., 16:40:14 UTC+3 пользователь Michael Klishin написал:

ksenya muratova

unread,
Sep 12, 2016, 10:56:52 AM9/12/16
to rabbitmq-users
And the same in rabbitmqadmin

./rabbitmqadmin declare exchange name=my-new-exchange2123 type=x-jms-topic
Traceback (most recent call last):
  File "./rabbitmqadmin", line 1007, in <module>
    main()
  File "./rabbitmqadmin", line 413, in main
    method()
  File "./rabbitmqadmin", line 623, in invoke_declare
    self.put(uri, json.dumps(upload))
  File "./rabbitmqadmin", line 439, in put
    return self.http("PUT", "%s/api%s" % (self.options.path_prefix, path), body)
  File "./rabbitmqadmin", line 504, in http
    % (resp.status, resp.reason, path, resp.read()))
Exception: Received 500 Internal Server Error for path /api/exchanges/%2F/my-new-exchange2123
{"error":"Internal Server Error","reason":"{error,\n    {exit,\n        {{{error,\n              {amqp_error,internal_error,\n                  \"client version 'pre-1.2.0' incompatible with plugin for operation on exchange named 'my-new-exchange2123'\",\n                  none}},\n          [{rabbit_misc,execute_mnesia_transaction,1,\n               [{file,\"src/rabbit_misc.erl\"},{line,553}]},\n           {rabbit_misc,execute_mnesia_transaction,2,\n               [{file,\"src/rabbit_misc.erl\"},{line,563}]},\n           {rabbit_channel,handle_method,3,\n               [{file,\"src/rabbit_channel.erl\"},{line,1213}]},\n           {rabbit_channel,handle_cast,2,\n               [{file,\"src/rabbit_channel.erl\"},{line,457}]},\n           {gen_server2,handle_msg,2,\n               [{file,\"src/gen_server2.erl\"},{line,1032}]},\n           {proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,239}]}]},\n         {gen_server,call,\n             [<0.19418.64>,\n              {call,\n                  {'exchange.declare',0,<<\"my-new-exchange2123\">>,\n                      <<\"x-jms-topic\">>,false,true,false,false,false,[]},\n                  none,<0.19388.64>},\n              infinity]}},\n        [{gen_server,call,3,[{file,\"gen_server.erl\"},{line,188}]},\n         {rabbit_mgmt_util,'-amqp_request/5-fun-0-',4,\n             [{file,\"src/rabbit_mgmt_util.erl\"},{line,585}]},\n         {rabbit_mgmt_util,with_channel,5,\n             [{file,\"src/rabbit_mgmt_util.erl\"},{line,604}]},\n         {rabbit_mgmt_util,http_to_amqp,5,\n             [{file,\"src/rabbit_mgmt_util.erl\"},{line,532}]},\n         {webmachine_resource,resource_call,3,\n             [{file,\"src/webmachine_resource.erl\"},{line,186}]},\n         {webmachine_resource,do,3,\n             [{file,\"src/webmachine_resource.erl\"},{line,142}]},\n         {webmachine_decision_core,resource_call,1,\n             [{file,\"src/webmachine_decision_core.erl\"},{line,48}]},\n         {webmachine_decision_core,accept_helper,1,\n             [{file,\"src/webmachine_decision_core.erl\"},{line,612}]}]}}\n"}




понедельник, 12 сентября 2016 г., 16:40:14 UTC+3 пользователь Michael Klishin написал:

ksenya muratova

unread,
Sep 12, 2016, 11:22:50 AM9/12/16
to rabbitmq-users
I deleted rabbit 3.6.5 and installed rabbit 3.6.3, and see the same error.

понедельник, 12 сентября 2016 г., 16:40:14 UTC+3 пользователь Michael Klishin написал:

Michael Klishin

unread,
Sep 12, 2016, 11:46:35 AM9/12/16
to rabbitm...@googlegroups.com
Alright, we will take a look as time permits.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

ksenya muratova

unread,
Sep 12, 2016, 12:14:25 PM9/12/16
to rabbitmq-users
It is said here http://stackoverflow.com/questions/33384341/how-to-connect-to-rabbitmq-using-rabbitmq-jms-client-from-an-existing-jms-applic that I should see new exchange after plugin enabled.

But I do not see new exchange.

понедельник, 12 сентября 2016 г., 18:46:35 UTC+3 пользователь Michael Klishin написал:

Michael Klishin

unread,
Sep 12, 2016, 12:25:39 PM9/12/16
to rabbitm...@googlegroups.com
Well, I do. All I did was

`rabbitmq-plugins enable rabbitmq_jms_topic_exchange`

and then navigated to the exchanges page.

I can reproduce the error by attempting to declare an exchange from that page's form, though.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Sep 12, 2016, 12:28:15 PM9/12/16
to rabbitm...@googlegroups.com

Michael Klishin

unread,
Sep 13, 2016, 11:09:37 AM9/13/16
to rabbitmq-users
Alright, so I went ahead to simply eliminate the version check. Given that the JMS Java client is no longer
versioned and released in lock step with the plugin, the version compatibility policy we had in place
no longer made sense anyway.

Here's the PR in case anyone is interested and the new plugin will be in 3.6.6:

I will produce and upload an .ez from the tip of stable in a few hours.

Thank you for reporting this, Ksenya.


On Monday, September 12, 2016 at 7:28:15 PM UTC+3, Michael Klishin wrote:
On Mon, Sep 12, 2016 at 7:25 PM, Michael Klishin wrote:
Well, I do. All I did was

`rabbitmq-plugins enable rabbitmq_jms_topic_exchange`

and then navigated to the exchanges page.

I can reproduce the error by attempting to declare an exchange from that page's form, though.

--

ksenya muratova

unread,
Sep 13, 2016, 11:36:52 AM9/13/16
to rabbitmq-users
Ok, Michael, does there exist a version of rabbitmq-server, where I can create jms-exchange from web UI? :)

вторник, 13 сентября 2016 г., 18:09:37 UTC+3 пользователь Michael Klishin написал:

Michael Klishin

unread,
Sep 13, 2016, 1:36:38 PM9/13/16
to rabbitm...@googlegroups.com
You can build the plugin from source or use the .ez I am going to upload
later and replace the plugin shipped in any RabbitMQ version starting with 3.6.3.
--

Artur Drummond

unread,
Sep 13, 2016, 4:43:23 PM9/13/16
to rabbitmq-users
Hi Michael. 

I got the same problem here. Just downloaded Rabbitmq 3.6.5 and enabled the plugin rabbitmq_jms_topic_exchange.
When I try to create the Exchange with the type 'x-jms-topic' the same error occurs.

Where can I download the .ez file?

Michael Klishin

unread,
Sep 13, 2016, 5:12:15 PM9/13/16
to rabbitm...@googlegroups.com
See attached.

To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
rabbitmq_jms_topic_exchange.ez.zip

Artur Drummond

unread,
Sep 13, 2016, 5:30:54 PM9/13/16
to rabbitmq-users
Ok. I've updated my RabbitMQ with the new version of the plugin and it worked:





Just created the 'test' exchange with x-jms-topic type as you can see.

Thanks for the help Michael!

Artur Drummond

unread,
Sep 13, 2016, 6:34:56 PM9/13/16
to rabbitmq-users
hum... Now I got another problem but I'm not sure if I what I am doing is correct.

According to the plugin documentation, I should:

  1. Create one Exchange of type 'x_jms_topic'. (Ok, done it. The name is 'jms-exchange') 
  2. Create another Exchange of type 'Topic'. (Ok, done it. The name is 'topic-exchange')
  3. Create a Binding from 'jms-exchange' Exchange to 'topic-exchange'. (Got a Problem.)


















I've also tried to create a Binding from 'jms-exchange' to a new Queue but I also got a problem.

Michael Klishin

unread,
Sep 13, 2016, 6:59:39 PM9/13/16
to rabbitm...@googlegroups.com
Please start a separate thread with a transcript of how this can be reproduced e.g. with `rabbitmqadmin`.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Michael Klishin

unread,
Sep 13, 2016, 7:03:23 PM9/13/16
to rabbitm...@googlegroups.com
I already see what's missing. You haven't provided any selectors (and if you don't use any,
it makes no sense to use the x_jms_topic exchange type).

You can use RabbitMQ JMS client without declaring much if you don't need to use JMS selectors.

On Wed, Sep 14, 2016 at 1:34 AM, Artur Drummond <artu...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Artur Drummond

unread,
Sep 14, 2016, 2:19:24 PM9/14/16
to rabbitmq-users
MK, I've created a separate thread with a transcript of how this can be reproduced e.g. with 'rabbitmqadmin':




On Tuesday, September 13, 2016 at 8:03:23 PM UTC-3, Michael Klishin wrote:
I already see what's missing. You haven't provided any selectors (and if you don't use any,
it makes no sense to use the x_jms_topic exchange type).

You can use RabbitMQ JMS client without declaring much if you don't need to use JMS selectors.
On Wed, Sep 14, 2016 at 1:34 AM, Artur Drummond <artu...@gmail.com> wrote:
hum... Now I got another problem but I'm not sure if I what I am doing is correct.

According to the plugin documentation, I should:

  1. Create one Exchange of type 'x_jms_topic'. (Ok, done it. The name is 'jms-exchange') 
  2. Create another Exchange of type 'Topic'. (Ok, done it. The name is 'topic-exchange')
  3. Create a Binding from 'jms-exchange' Exchange to 'topic-exchange'. (Got a Problem.)


















I've also tried to create a Binding from 'jms-exchange' to a new Queue but I also got a problem.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages