5

I'm facing problem whil connecting a network of ActiveMQ.

I have two scenarios :

S1 : My application is connected to a first activeMQ "A". And this activeMQ "A" is connected to an ActiveMQ "B" - This is the scenario which cause me some issues. S2 : My application is directly connected to the ActiveMQ "B".

In both case we are sending data to the same queue and of course we send the exactly same data. What is expected : when ActiveMQ "B" receive data it should respond on the same queue.

In scenario S1, the data is send by my application to the ActiveMQ "A" and then forwarded to the ActiveMQ "B" but this ActiveMQ "B" does not seems to response, the fact is ActiveMQ "A" does not receive data from ActiveMQ "B". This is my main problem and I can't figure out why it's not working because if I connect my application directly to the ActiveMQ "B" I receive data.

I've try to make a simple schema down there that explain S1 and S2.

Does anyone have already encountered this kind of problem ? Where should I look into to find the cause of the problem ?

enter image description here

EDIT : Some more details :

In activeMQ "A" I can see there are consumers (the column "Number of consumer" is equal to 5) however in activeMQ "B" there are no consumer (the column "Number of consumer" is 0) whereas it should be 5 as in active MQ "A". Any ideas ?

Ashbay
  • 1,641
  • 13
  • 20
  • Could you elaborate in your scenario S1, what exactly the ActiveMQ B is supposed to do? Is there another consumer polling the B server and producing a response? – Adonis May 24 '17 at 21:34
  • I personally experienced a similar situation but your case may be different. If you are using separate queue for each consumer, the communication broken could be because of the blocking queue that has a whole lot of pending messages for a specific consumer. Check the queue and try cleaning up. – Uday May 27 '17 at 07:01

2 Answers2

1

maybe related with networkTTL config.(http://activemq.apache.org/networks-of-brokers.html)

In default config, message can go only one step in the network. If it go from A to B, it can't be back to A.

Mobility
  • 3,117
  • 18
  • 31
  • I added networkTTL="3" to my connector but the issue remain the same. I want to add something about my problem : In activeMQ "A" I can see there are consumer (the column "Number of consumer" is equal to 5) however in activeMQ "B" there are no consumer (the column "Number of consumer" is 0) whereas it should be 5 as in active MQ "A". Any ideas ? – Ashbay May 19 '17 at 19:00
0

ActiveMQ "A" and ActiveMQ "B" use simple authentification plugin in both ways. My problem was when answering, ActiveMQ "B" tried to connect to Active MQ "A" but failed to authenticiate... that's so simple ! The fact is I did not have controle over ActiveMQ "B". So the solution was to configure ActiveMQ "A" in order to accept user/pwd from ActiveMQ "B".

Ashbay
  • 1,641
  • 13
  • 20