Announcement Announcement Module
No announcement yet.
Unregistering of MessageEndpoint-s ? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unregistering of MessageEndpoint-s ?

    Hi guys,
    I'm playing around with the Spring-Integration M1 and my first impressions so far are more than positive. The API is nice, self-explanatory and it saves a great amount of cumbersome work.

    My test scenario is consisting of a Single MessageProducer, that sends messages through a defined MessageChannel, and MessageEndpoints - dynamic objects that come and go at runtime.

    Do you think that the unregistration of MessageEndpoint-s would be a sensible feature ?

    thanks a lot in advance,

    P.S. I have to confess, my "test scenario" is an actual project in our company, that is a potential candidate to use Spring-Integration. We already use Spring-DM and are more than pleased.

  • #2
    I believe that you need to extend the bus class with an unregisterEndpoint method. First it needs to get the right dispatcher for the endpoint (which is really a handler) so it needs the channel that the endpoint is listening on, then extend the dispatcher class to remove it from the handler list (and stop the endpoint once it is removed if that is the semantics you want). I think that the registerHandler() method wraps the handler in a default endpoint so you would probably only could remove endpoints or you would need to provide additional information to find the endpoint and then the channel from a straight handler. Last I recall there was no way to extend the bus class and stick in your own handler or endpoint factories to make this easier.


    • #3
      The MessageBus does include an 'unregisterEndpoint' method. This was added in M3 if I recall correctly.



      • #4
        I've got something similar working kenimanev. However there is still no unregisterSourceAdapter as far as I can see.