Results 1 to 2 of 2

Thread: Suspend consumers without deleting autodelete queues

  1. #1

    Question Suspend consumers without deleting autodelete queues

    Hi,
    I kind of have a weired requirement where System engineer will want to suspending queue consumers(not stop).

    The cases for suspending consumers can be as follows :
    System Engg temporily wants to detach a consumer.
    Some configuration changes being made to consumer.


    I thought of achieving this with listenerContainer.stop and listnerContainer.start (using jmx or control bus etc).

    But there are lot of cases where the queues I create are AutoDelete Queues, in these cases, the queues gets deleted when the system engineer shuts the consumer (assuming there is only one consumer for that service).

    So instead of stop and start, I need a suspend where the physical connection between the consumer and rabbit broker is still held, but consumer do not listen to incoming message.

    Would appriciate any pointers to acheive this.

    May be I need some kind of SuspendableBlockingQueueConsumer implemenation or so. Is there any thing already available in SI/SI-amqp?

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,146

    Default

    There's no concept of a "paused" consumer in AMQP itself (let alone spring-amqp or SI).

    One thing you could do is add an advice to the listener container's advice-chain that would suspend the container's threads, but it's important to understand that each thread would be paused when a message arrives and you'd have an in-process delivery running on each thread. When the maintenance period is over, the advice would let the threads proceed.

    auto-delete queues are a little scary to me in this environment; if you don't want the queue to be deleted during this maintenance period, it would seem you wouldn't want it deleted if, say, the consumer failed for some reason.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •