dcsimg
redundant system: queue configuration
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andrea_Gambirasio
Posted On:   Thursday, October 23, 2003 10:43 AM

Hi all, I'm trying to create a redundant system made of 2 data producers Prod1, Prod2 and 2 data consumers Cons1 and Cons2 (on 2 different machines). On the two machines I installed the latest version of SwiftMQ so I have router R1 on the first machine and router R2 on the second machine. Producers wait for requests on a queue named "Queue". My intent is to get to a configuration where any consumer connects to "Queue", possibly without specifying on which router it is, sends its request and gets an answer by Prod1 or Prod2 without caring who is answering. (It should be possible to achieve this using routing federation, right?). In this way I assume that if Prod1 is down, Prod2 will answer to all the querie   More>>

Hi all, I'm trying to create a redundant system made of 2 data producers Prod1, Prod2 and 2 data consumers Cons1 and Cons2 (on 2 different machines). On the two machines I installed the latest version of SwiftMQ so I have router R1 on the first machine and router R2 on the second machine.
Producers wait for requests on a queue named "Queue".


My intent is to get to a configuration where any consumer connects to "Queue", possibly without specifying on which router it is, sends its request and gets an answer by Prod1 or Prod2 without caring who is answering. (It should be possible to achieve this using routing federation, right?).


In this way I assume that if Prod1 is down, Prod2 will answer to all the queries, until Prod1 is up again.



Currently my config is:


Routers:
--------


Queue@R1 (with a JNDI alias "Queue"="Queue@R1")


Queue@R2 (with a JNDI alias "Queue"="Queue@R2")


And the two routers are federated: R1 has a listener, R2 has a connector and they communicate



Producers:
----------


Prod1 connects to "Queue"


Prod2 connects to "Queue"



Consumers:
----------


Cons1 connects to "Queue"


Cons2 connects to "Queue"



If Prod2 is down, requests from Cons2 are NOT routed to Prod1. It looks like "Queue@R1" and "Queue@R2" are somehow not "federated" by the two routers.


What's wrong in my config? I imagine it has to do with aliases...


Thanks



Andrea

   <<Less

Re: redundant system: queue configuration

Posted By:   Andreas_Mueller  
Posted On:   Monday, October 27, 2003 03:41 AM

I think you misunderstand the term "Federated Router Network". It is defined here.


Basically, with P2P, you can send messages from any router to any known queue in a router network. To receive messages, you must connect to the router where the queue is hosted.


If you define 2 queues on different routers with the same name, they have nothing in common, in fact they have also different names, "Queue@R1" and "Queue@R2".


So what you should do in your above example is to define one queue, e.g. "Queue@R1" and let both Prod1 and Prod2 connect to it, receiving requests. Then let your Cons1 and Cons2 send messages to "Queue@R1". Prod1/2 and Cons1/2 can be connected to different routers but they can also be on the same router.
About | Sitemap | Contact