Results 1 to 3 of 3

Thread: Removing a ServiceActivator dynamically

  1. #1
    Join Date
    May 2011
    Posts
    4

    Default 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. #2
    Join Date
    Jun 2011
    Posts
    25

    Default

    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

  3. #3
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    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

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
  •