How to Listen to a Rabbitmq Queue Events

i'm not sure if my understanding with the documentation is correct but my
question here is can the event_handler {ServicePool,Broadcast,Singleton}
listen to the Rabbitmq server for the events and for a standard usecase how
to use the event_handler to listen to the events?I'm bit confused on the
examples that are being shared in the repo.

An Event is a nameko construct. You can use the EventDispatcher to dispatch
events from services, and the event_handler to receive them. It's an
implementation of the publisher-subscriber pattern which happens to use
AMQP.

I guess what you're really asking about is how to consume regular AMQP
messages with a nameko service. If so, this is possible, and has been asked
about on the forum before.
See https://groups.google.com/d/msg/nameko-dev/4CBsB4rLFrM/klcnkYU9AwAJ for
more.

Does that help?

···

On Sunday, April 24, 2016 at 2:16:00 AM UTC+1, geeta raghu vamsi kotipalli wrote:

i'm not sure if my understanding with the documentation is correct but my
question here is can the event_handler {ServicePool,Broadcast,Singleton}
listen to the Rabbitmq server for the events and for a standard usecase how
to use the event_handler to listen to the events?I'm bit confused on the
examples that are being shared in the repo.

Thanks Matt for the reference i got it working but i have another scenario
where i need to listen to multiple AMQP services which the decorators
trigger to different functions inside the service container

Example

config.yaml

AMQP_URL_1 = http://localhost:7777/testing
AMQP_URL_2 = http://localhost:8888/test

service.py

from kombu import Queue

amq_one = Queue('testing')
amq_two = Queue('test')

class Testing(object):
  
  @consume(amq_one)
  def testing(self,msg):
    print "Message from AMQP 1"

  @consume(amq_two)
   def test(self,msg):
     print "Message from AMQP 2"

Thanks,
Vamsi

···

On Sunday, April 24, 2016 at 7:51:39 AM UTC-5, Matt Bennett wrote:

An Event is a nameko construct. You can use the EventDispatcher to
dispatch events from services, and the event_handler to receive them. It's
an implementation of the publisher-subscriber pattern which happens to use
AMQP.

I guess what you're really asking about is how to consume regular AMQP
messages with a nameko service. If so, this is possible, and has been asked
about on the forum before. See
https://groups.google.com/d/msg/nameko-dev/4CBsB4rLFrM/klcnkYU9AwAJ for
more.

Does that help?

On Sunday, April 24, 2016 at 2:16:00 AM UTC+1, geeta raghu vamsi kotipalli > wrote:

i'm not sure if my understanding with the documentation is correct but my
question here is can the event_handler {ServicePool,Broadcast,Singleton}
listen to the Rabbitmq server for the events and for a standard usecase how
to use the event_handler to listen to the events?I'm bit confused on the
examples that are being shared in the repo.

Unfortunately this is not possible. You will have to use two services, or
you may want to look at the RabbitMQ shovel
<https://www.rabbitmq.com/shovel.html> to move messages between brokers.

···

On Monday, April 25, 2016 at 4:29:39 PM UTC+1, geeta raghu vamsi kotipalli wrote:

Thanks Matt for the reference i got it working but i have another scenario
where i need to listen to multiple AMQP services which the decorators
trigger to different functions inside the service container

Example

config.yaml

AMQP_URL_1 = http://localhost:7777/testing
AMQP_URL_2 = http://localhost:8888/test

service.py

from kombu import Queue

amq_one = Queue('testing')
amq_two = Queue('test')

class Testing(object):
  
  @consume(amq_one)
  def testing(self,msg):
    print "Message from AMQP 1"

  @consume(amq_two)
   def test(self,msg):
     print "Message from AMQP 2"

Thanks,
Vamsi

On Sunday, April 24, 2016 at 7:51:39 AM UTC-5, Matt Bennett wrote:

An Event is a nameko construct. You can use the EventDispatcher to
dispatch events from services, and the event_handler to receive them. It's
an implementation of the publisher-subscriber pattern which happens to use
AMQP.

I guess what you're really asking about is how to consume regular AMQP
messages with a nameko service. If so, this is possible, and has been asked
about on the forum before. See
https://groups.google.com/d/msg/nameko-dev/4CBsB4rLFrM/klcnkYU9AwAJ for
more.

Does that help?

On Sunday, April 24, 2016 at 2:16:00 AM UTC+1, geeta raghu vamsi >> kotipalli wrote:

i'm not sure if my understanding with the documentation is correct but
my question here is can the event_handler {ServicePool,Broadcast,Singleton}
listen to the Rabbitmq server for the events and for a standard usecase how
to use the event_handler to listen to the events?I'm bit confused on the
examples that are being shared in the repo.

Should i make changes on the Rabbitmq server to enable shovel so that my
client gets those events or i need to do it at the client side.

Thanks,
Vamsi

···

On Monday, April 25, 2016 at 4:50:41 PM UTC-5, Matt Bennett wrote:

Unfortunately this is not possible. You will have to use two services, or
you may want to look at the RabbitMQ shovel
<https://www.rabbitmq.com/shovel.html> to move messages between brokers.

On Monday, April 25, 2016 at 4:29:39 PM UTC+1, geeta raghu vamsi kotipalli > wrote:

Thanks Matt for the reference i got it working but i have another
scenario where i need to listen to multiple AMQP services which the
decorators trigger to different functions inside the service container

Example

config.yaml

AMQP_URL_1 = http://localhost:7777/testing
AMQP_URL_2 = http://localhost:8888/test

service.py

from kombu import Queue

amq_one = Queue('testing')
amq_two = Queue('test')

class Testing(object):
  
  @consume(amq_one)
  def testing(self,msg):
    print "Message from AMQP 1"

  @consume(amq_two)
   def test(self,msg):
     print "Message from AMQP 2"

Thanks,
Vamsi

On Sunday, April 24, 2016 at 7:51:39 AM UTC-5, Matt Bennett wrote:

An Event is a nameko construct. You can use the EventDispatcher to
dispatch events from services, and the event_handler to receive them. It's
an implementation of the publisher-subscriber pattern which happens to use
AMQP.

I guess what you're really asking about is how to consume regular AMQP
messages with a nameko service. If so, this is possible, and has been asked
about on the forum before. See
https://groups.google.com/d/msg/nameko-dev/4CBsB4rLFrM/klcnkYU9AwAJ for
more.

Does that help?

On Sunday, April 24, 2016 at 2:16:00 AM UTC+1, geeta raghu vamsi >>> kotipalli wrote:

i'm not sure if my understanding with the documentation is correct but
my question here is can the event_handler {ServicePool,Broadcast,Singleton}
listen to the Rabbitmq server for the events and for a standard usecase how
to use the event_handler to listen to the events?I'm bit confused on the
examples that are being shared in the repo.

Shovel is a plugin for the broker -- it's all server-side.

I'm suggesting that you use shovel to move messages from one broker to
another, so you can connect your nameko service to just one of them.

···

On Monday, May 2, 2016 at 4:22:21 PM UTC+1, geeta raghu vamsi kotipalli wrote:

Should i make changes on the Rabbitmq server to enable shovel so that my
client gets those events or i need to do it at the client side.

Thanks,
Vamsi

On Monday, April 25, 2016 at 4:50:41 PM UTC-5, Matt Bennett wrote:

Unfortunately this is not possible. You will have to use two services, or
you may want to look at the RabbitMQ shovel
<https://www.rabbitmq.com/shovel.html> to move messages between brokers.

On Monday, April 25, 2016 at 4:29:39 PM UTC+1, geeta raghu vamsi >> kotipalli wrote:

Thanks Matt for the reference i got it working but i have another
scenario where i need to listen to multiple AMQP services which the
decorators trigger to different functions inside the service container

Example

config.yaml

AMQP_URL_1 = http://localhost:7777/testing
AMQP_URL_2 = http://localhost:8888/test

service.py

from kombu import Queue

amq_one = Queue('testing')
amq_two = Queue('test')

class Testing(object):
  
  @consume(amq_one)
  def testing(self,msg):
    print "Message from AMQP 1"

  @consume(amq_two)
   def test(self,msg):
     print "Message from AMQP 2"

Thanks,
Vamsi

On Sunday, April 24, 2016 at 7:51:39 AM UTC-5, Matt Bennett wrote:

An Event is a nameko construct. You can use the EventDispatcher to
dispatch events from services, and the event_handler to receive them. It's
an implementation of the publisher-subscriber pattern which happens to use
AMQP.

I guess what you're really asking about is how to consume regular AMQP
messages with a nameko service. If so, this is possible, and has been asked
about on the forum before. See
https://groups.google.com/d/msg/nameko-dev/4CBsB4rLFrM/klcnkYU9AwAJ
for more.

Does that help?

On Sunday, April 24, 2016 at 2:16:00 AM UTC+1, geeta raghu vamsi >>>> kotipalli wrote:

i'm not sure if my understanding with the documentation is correct but
my question here is can the event_handler {ServicePool,Broadcast,Singleton}
listen to the Rabbitmq server for the events and for a standard usecase how
to use the event_handler to listen to the events?I'm bit confused on the
examples that are being shared in the repo.

Infact this implementation is totally to communicate multiple datacenters
across the globe and the server setup is so static and changing or
including a plugin or component needs lots of mail chains for approval so
was thinking for a easy solution around.

···

On Monday, May 2, 2016 at 10:53:23 AM UTC-5, Matt Bennett wrote:

Shovel is a plugin for the broker -- it's all server-side.

I'm suggesting that you use shovel to move messages from one broker to
another, so you can connect your nameko service to just one of them.

On Monday, May 2, 2016 at 4:22:21 PM UTC+1, geeta raghu vamsi kotipalli > wrote:

Should i make changes on the Rabbitmq server to enable shovel so that my
client gets those events or i need to do it at the client side.

Thanks,
Vamsi

On Monday, April 25, 2016 at 4:50:41 PM UTC-5, Matt Bennett wrote:

Unfortunately this is not possible. You will have to use two services,
or you may want to look at the RabbitMQ shovel
<https://www.rabbitmq.com/shovel.html> to move messages between brokers.

On Monday, April 25, 2016 at 4:29:39 PM UTC+1, geeta raghu vamsi >>> kotipalli wrote:

Thanks Matt for the reference i got it working but i have another
scenario where i need to listen to multiple AMQP services which the
decorators trigger to different functions inside the service container

Example

config.yaml

AMQP_URL_1 = http://localhost:7777/testing
AMQP_URL_2 = http://localhost:8888/test

service.py

from kombu import Queue

amq_one = Queue('testing')
amq_two = Queue('test')

class Testing(object):
  
  @consume(amq_one)
  def testing(self,msg):
    print "Message from AMQP 1"

  @consume(amq_two)
   def test(self,msg):
     print "Message from AMQP 2"

Thanks,
Vamsi

On Sunday, April 24, 2016 at 7:51:39 AM UTC-5, Matt Bennett wrote:

An Event is a nameko construct. You can use the EventDispatcher to
dispatch events from services, and the event_handler to receive them. It's
an implementation of the publisher-subscriber pattern which happens to use
AMQP.

I guess what you're really asking about is how to consume regular AMQP
messages with a nameko service. If so, this is possible, and has been asked
about on the forum before. See
https://groups.google.com/d/msg/nameko-dev/4CBsB4rLFrM/klcnkYU9AwAJ
for more.

Does that help?

On Sunday, April 24, 2016 at 2:16:00 AM UTC+1, geeta raghu vamsi >>>>> kotipalli wrote:

i'm not sure if my understanding with the documentation is correct
but my question here is can the event_handler
{ServicePool,Broadcast,Singleton} listen to the Rabbitmq server for the
events and for a standard usecase how to use the event_handler to listen to
the events?I'm bit confused on the examples that are being shared in the
repo.