How to create programmatically a spring PublishSubscribeChannel -


i want create programmatically following xml config

<int:channel id="sample"> </int:channel> 

what can following

publishsubscribechannel channel = new publishsubscribechannel(); 

but there no method assign id.

actually <int:channel> produces directchannel bean.

and if want programatically , have entire messaging infrastructure should configure bean anyway:

@configuration public class myconfiguration {     @bean    public messagechannel sample() {        return new directchannel();    }  } 

the id attribute key feature of spring ioc container and, of course, isn't responcibility of concrete class.

seems me should take new stuff of spring integration 4.0.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -