Results 1 to 6 of 6

Thread: Still really struggling with @Publisher

  1. #1
    Join Date
    Nov 2010
    Posts
    17

    Default Still really struggling with @Publisher

    I still can not understand how to get a publisher to publish to an integration channel. I have included the project here. I have been stuck at this point for a couple of days now. I know that message is coming over Spring AMQP but it never fires into the file:outbound-channel-adapter. I think it is because I have two containers and I don't know enough about Spring to merge the containers.

    Spring-amqp-integration-example.zip

    This is the final step in a proof of concept which looks like at the moment will conclude not to use spring partly due to not getting this example working.

    Any help will be appreciated.

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    I'll look at the project when I have a moment, but we're really busy right now getting 2.0 Final out the door.

    It does sound like you might be a bit confused though. @Publisher is used for AOP-driven messaging and should not have much to do with an AMQP inbound adapter.

  3. #3
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,844

    Default

    Any chance you can just attach the zip file directly here?

  4. #4
    Join Date
    Nov 2010
    Posts
    17

    Default

    Here it is attached as requested

    spring-amqp-integration-sample.zip

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

    Default

    Quick observations

    1. Your receive.xml defines file-outbound-channel-adapter instead of inbound-channel-adapter and your send is the opposite.
    The bottom line is that inbound-chanel-adapters are used to bridge the path FROM the external system to Spring Integration while outbound-channel-adapter bridge Spring Integration TO the External system

    2. unless you are instantiating two of your configuration as a single application context (which you are not) it will not work without some type of remoting since you are starting two JVMs.

    As far as @Publisher i don't even think you need it.

    Let's try it differently, try to describe your use case and we'll go from there.

  6. #6
    Join Date
    Nov 2010
    Posts
    17

    Default

    @Mark OK I appreciate that you are hard against it.

    @Oleg in my sample the Inbound and Outbound Channel adapters are just used to get and save files. Which is why they may appear at a glance counter-intuitive. But the Publisher component has an file:inbound-adapter which it uses to get files it then uses a service activator to adapt the SI message into an AMQP message and send it.

    The Subscribe end uses Spring AMQP to register a handler that publishes the unwrapped message back to the SI side. I have re-factored it to get it to work now and it does finally work. Attached below. I cant do it properly because I cant wield the IOC and AOP framework due to lack of experience.

    I did have a look at the proper way of doing it with channel adapters like in the Spring - Amqp - Integration in sand box. But I could not compile the sandbox project, because a) there is no POM b) the xsds referenced in the config files were not available.

    Thanks good luck with the 2.0 release. I'll be interested when then AMQP support makes it out of the sandbox.


    IntegrationAMQP2.zip

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
  •