Skip to Content
Author's profile photo Nic Botha

Creating a custom HCI Adapter – Part 3

Overview

Part 3 – Create integration flow using new adapter and see it working

You made it!  In Part 1 of this series we created the Camel component.  In Part 2 we created the HCI adapter and deployed it to our tenant.  All that is left to do is to use the new adapter in a integration flow and test that the endpoints works as expected.

Step – Create an Integration project

We will create a basic HCI integration flow using our echo adapter as sender.  To do this lets first create a new integration project called echo-integration.  The outcome should be

/wp-content/uploads/2016/05/part3_1_944551.png

Step – Modify the channel

Select the sender channel (line between Sender and Start) and select the Channels tab

/wp-content/uploads/2016/05/part3_2_944555.png

On the Adapter Type click Browse. The choose adapter dialog appears and shows all the available adapters.  Select the echo adapter.

/wp-content/uploads/2016/05/part3_3_944556.png

After selection you will notice the Transport Protocol and Message Protocol fields contain values.  These values are directly related to the metadata.xml generated in Part 2.  If you have a look at the metadata.xml sender variant element you will see the VariantId element.  And this is where the transport protocol and message protocol are specified. 


<Variant VariantName="Echo Component Sender" gen:RuntimeComponentBaseUri="echo" VariantId="ctype::AdapterVariant/cname::me:echo/tp::echo/mp::echo/direction::Sender" MetadataVersion="2.0" AttachmentBehavior="Preserve">




Select the Adapter Specific tab and enter the following values

  • First URI Part = foo
  • Delay = 5000

/wp-content/uploads/2016/05/part3_4_944557.png

Finish the integration flow by configuring the receiver channel.  Again you can use the echo adapter, this time set the First URI Part to bar.

Step – Deploy and test

Deploy the echo-integration project to your tenant and monitor the messages.  If everything worked you will see something like this

/wp-content/uploads/2016/05/part3_5_944564.png

Conclusion

And that is it, we are done.  Thank you for reading and I hope you found this information useful.  Goodbye from a sunny Melbourne!

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Thanks Nic for this blog.. Keep sharing more information 🙂

      Regards,

      Aman

      Author's profile photo Former Member
      Former Member

      Hi Nic! Excelent blog series!

       

      I'm following your steps but when I deploy the integration flow I'm getting this error:

      Unable to start blueprint container for bundle echo-adapter-test due to unresolved dependencies [(&(component=echo)(objectClass=org.apache.camel.spi.ComponentResolver))]java.util.concurrent.TimeoutException: null
      Any clue to what I'm missing?

       

      Thanks