Announcement Announcement Module
Collapse
No announcement yet.
Removing a ServiceActivator dynamically Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Removing a ServiceActivator dynamically

    Hi,

    I am using spring-integration 2.0.0.RELEASE and spring 3.0.5.RELEASE in my application. I am trying to create message endpoints dynamically which subscribe to a publish-subscribe channel. I am using @MessageEndpoint with @Scope("prototype") and spring bean ObjectFactory to create multiple instances of message endpoint dynamically. I have a method annotated by @ServiceActivator(inputChannel="channelName"). This works as expected for subscribing to message. I am able to create multiple subscribers dynamically and all of them receive the same message simultaneously.

    But, while cleanup I am not able to unsubscribe from the channel. I still keep receiving the message on the service-activation of the cleaned up object. I tried to use the control-bus but I don't know how to specify the service-activator id for sending the stop() message.

    Thanks,
    Sudeep

  • #2
    Sudeep,

    I'd be interested to recreate this, could you provide some more code snippets and config? Was it based on a sample or created from scratch.

    Thanks
    David

    Comment


    • #3
      Yes a code snippet would be helpful. Also, what would be helpful is if you can explain your use case. THere might be a better way of solving it
      I am a also concerned with 'prototype' setting which might not have the effect you expect

      Comment

      Working...
      X