You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Matthias Vetter <ma...@atos.net> on 2012/12/14 15:08:42 UTC

receiving messages from a topic as if it was a queue, without being subscriber

We want to implement a recovery structure for both queue and topic messages.
We have two servers running each with an embedded broker. On failure of the
first server (and vice versa), the second server starts a “slave” broker,
which connects to the datastore of the failed remote broker. It iterates
over all existing queues there (using adminView.getQueues), finds all
pending messages and sends them to the eponymous queues of the still running
broker in the second server.
It would be nice if this applied also to topics. But the “slave” broker
never registered as a subscriber at the topics in the remote server. Is
there a way to access a topic as if it was a queue (and then receive all
messages and publish them anew to the topics of the survived broker?). 
Could declaring a VirtualTopic be a possible way?
If one asks himself why we need this structure, and don’t just rely on a
failover scenario, the answer is: we have plenty of messages from inside the
server that we don’t want to get lost. Failover is good for external
clients, which will connect to the surviving broker.




--
View this message in context: http://activemq.2283324.n4.nabble.com/receiving-messages-from-a-topic-as-if-it-was-a-queue-without-being-subscriber-tp4660660.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

AW: receiving messages from a topic as if it was a queue, without being subscriber

Posted by Matthias Vetter <ma...@atos.net>.
Hello Christian, thanks for the reply.

About Failover: this is used for clients, which aren't able to send
messages to the failed broker. It is just the normal way we use the
failover protocol.

But as additional scenario we need, as you correctly understood, another
client, which really retrieves all hanging messages from the dead
broker's store and shift them to the living broker.

Therefore, we search for an easy way to access a topic without having
been subscriber before. 

If virtual topics could be helpful, I'd be glad..

Another aspect is, how to handle topic messages on the alive server.
Maybe we retrieve a message that was already read by four of five
subscribers in the failed environment. On the live environment there are
identical subscribers. How to find out the one subscriber there, which
is supposed to get the message..

Seems not so easy..

Regards

Matthias Vetter, Frankfurt 

 

Von: ceposta [via ActiveMQ]
[mailto:ml-node+s2283324n4660675h34@n4.nabble.com] 
Gesendet: Freitag, 14. Dezember 2012 18:03
An: Vetter, Matthias
Betreff: Re: receiving messages from a topic as if it was a queue,
without being subscriber

 

Yah so virtual topics can behave like queues under the covers. 

But not sure I follow you here: 

Failover is good for external 
> clients, which will connect to the surviving broker. 
> 
> Maybe because I'm not getting exactly what these "messages from inside
the 
server" are. 
Sounds like you want a failover scenario where the "external client" is 
pulling the lost messages and replaying them to the alive server? 



> 
> 
> 
> -- 
> View this message in context: 
>
http://activemq.2283324.n4.nabble.com/receiving-messages-from-a-topic-as
-if-it-was-a-queue-without-being-subscriber-tp4660660.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com. 
> 



-- 
*Christian Posta* 
http://www.christianposta.com/blog
twitter: @christianposta 

http://www.christianposta.com/blog 

 

________________________________

If you reply to this email, your message will be added to the discussion
below:

http://activemq.2283324.n4.nabble.com/receiving-messages-from-a-topic-as
-if-it-was-a-queue-without-being-subscriber-tp4660660p4660675.html 

To unsubscribe from receiving messages from a topic as if it was a
queue, without being subscriber, click here
<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=un
subscribe_by_code&node=4660660&code=bWF0dGhpYXMudmV0dGVyQGF0b3MubmV0fDQ2
NjA2NjB8LTE2MDA0NTE1NTk=> .
NAML
<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=ma
cro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namesp
aces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view
.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aem
ail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabbl
e%3Aemail.naml>  


__________________________________________________________________________________________________________________________________________
Atos Information Technology GmbH, Luxemburger Strasse 3, D-45131 Essen, Postfach 100 147, D-45001 Essen
Telefon: +49 201 4305 0, Fax: +49 201 4305 689095, www.de.atos.net
ING Bank AG, Frankfurt/Main: Konto 001 014 0937, BLZ 500 210 00, Swift / BIC INGBDEFF, IBAN DE74 5002 1000 0010 1409 37
Geschäftsführer: Winfried Holz, Vorsitzender des Aufsichtsrats: Peter Hollfelder, Handelsregister Essen HRB 19354, Ust.-ID.-Nr.: DE147861238
___________________________________________________________________________________________________________________________________________




--
View this message in context: http://activemq.2283324.n4.nabble.com/receiving-messages-from-a-topic-as-if-it-was-a-queue-without-being-subscriber-tp4660660p4660735.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: receiving messages from a topic as if it was a queue, without being subscriber

Posted by Christian Posta <ch...@gmail.com>.
Yah so virtual topics can behave like queues under the covers.

But not sure I follow you here:

Failover is good for external
> clients, which will connect to the surviving broker.
>
> Maybe because I'm not getting exactly what these "messages from inside the
server" are.
Sounds like you want a failover scenario where the "external client" is
pulling the lost messages and replaying them to the alive server?



>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/receiving-messages-from-a-topic-as-if-it-was-a-queue-without-being-subscriber-tp4660660.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta