cancel
Showing results for 
Search instead for 
Did you mean: 

How to setup AMQP sender adapter for CPI to read queue from Enterprise Messaging

js2
Product and Topic Expert
Product and Topic Expert
0 Kudos

I have a queue in enterprise messaging and wish to read it with CPI. When I create the iflow with the AMQP adapter it asks for the following information:

  • host
  • port
  • path
  • authentication
  • credential

Where do I get these values from? I assume its the enterprise message service instance "service key" but I can't find any info on what matches which field in the iflow adapter?

Accepted Solutions (0)

Answers (4)

Answers (4)

Sriprasadsbhat
Active Contributor

Hello Jason,

Below should help you.Queue Name should be prefixed with queue: in processing tab of the sender adapter. You need to navigate to Monitoring->Security Material-> Create OAuth2 Credentials and use your details from Service Key to create credential to provide further in Credential Name.

Regards,

Sriprasad Shivaram Bhat

js2
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks sriprasadshivaramabhat , I have configured as you mentioned but I get a "Invalid handshake response getStatus: 400 Bad Request" error. With no further relevant information.

Have tried with and without the "queue:" prefix that you mentioned for the queue name. The full adapter URI provided in the log is:

amqpwss://enterprise-messaging-messaging-gateway.cfapps.ap10.hana.ondemand.com:443/protocols/mqtt311ws/ptcee/swatsafety/incident1/created. - where "ptcee/swatsafety/incident1/created" is the queue name.

vinaykumardigaveedi
Participant
0 Kudos

Hi sriprasadshivaramabhat, sriprasad.shivarambhat , jasonscott

Please help me resolve the issue. the above comment to Jason Scott is also my issue

What details do I need to give in Webhook for Event mesh

Thanks,

Vinay

Tobias_Griebe
Advisor
Advisor
0 Kudos

Hi vinaykumard,

this discussion here is rather old and the recommended approach is to use the AMQP adapter for inbound and outbound events.

Let's continue your question here.

Best regards,
Tobias

js2
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi sriprasadshivaramabhat,

Here's my configured amqp sender adapter connection details:

And processing details:

The safetyincidents-em credentials I created as OAuth2 client credentials and specified: Send in request header" and also let scopes "off".

With this config I can deploy the iflow and it starts successfully.

The status of the iflow shows that it is polling:

amqpwss://enterprise-messaging-messaging-gateway.cfapps.ap10.hana.ondemand.com:443/protocols/amqp10ws/queue:ptcee/swatsafety/incident1/created

However - I see no messages in the message monitor.

When I look at the queue in enterprise messaging I can see this:

The unacknowledged message number keeps changing. Its like the adapter is trying to read the message from the queue but its failing and retrying but I don't see any messages in the integration message monitor so no errors to investigate.

vinaykumardigaveedi
Participant
0 Kudos

Hi jasonscott ,

I am also facing Invalid Handshake error.

[CAMEL][IFLOW][EXCEPTION] : javax.jms.JMSException: Invalid handshake response getStatus: 403 Forbidden

[CAMEL][IFLOW][CAUSE] : Cause: org.apache.qpid.jms.provider.exceptions.ProviderIOException: Invalid handshake response getStatus: 403 Forbidden.

I have configured the same way as you did.

Could you please help me resolve this issue.

Thanks,

vinay

naveenkumar111
Explorer
0 Kudos

Hi jasonscott,

Please set the maximum number of retries count up to 5 or n retries, to reprocess the messages.

And kindly refer to this blog under this section for the detailed information related to it-

Executing Retries or Not?

- https://blogs.sap.com/2019/11/20/cloud-integration-connecting-to-external-messaging-systems-using-th...

Regards,

Naveen

Sriprasadsbhat
Active Contributor
0 Kudos

Hello Jason,

URL you have configured looks to be MQTT. Please use AMQP url from your service key. Also please share screenshot of your AMQP channel config.

Regards,

Sriprasad Shivaram Bhat