Create a message on RabbitMQ using cMessagingEndPoint

Four Stars

Create a message on RabbitMQ using cMessagingEndPoint

Hello everybody,

 

I'm beginner on Talend Open Studio for ESB, I'm trying to use the Camel component RabbitMQ with cMessageingEndpoint. 

 

I want to create a message in a specific queue, for the moment, I just create the queue on RabbitMQ, I don't which component I should add in my route to send a new message ...

 

I didn't find any tutorial or previous message on the forum ...

 

Thanks a lot !

 

2018-04-30_2020.png

 

 

Forteen Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint


@remi13wrote:

Hello everybody,

 

I'm beginner on Talend Open Studio for ESB, I'm trying to use the Camel component RabbitMQ with cMessageingEndpoint. 

 

I want to create a message in a specific queue, for the moment, I just create the queue on RabbitMQ, I don't which component I should add in my route to send a new message ...

 

I didn't find any tutorial or previous message on the forum ...

 

Thanks a lot !

 

 

 

 


 

Sure? Smiley Happy

 

https://community.talend.com/t5/Design-and-Development/ESB-Route-consuming-messages-from-RabbitMQ/td...

https://community.talend.com/t5/Design-and-Development/RabbitMQ-pub-sub-pattern-using-cMQConnectionF...

https://community.talend.com/t5/Design-and-Development/cMessagingEndpoint-and-RabbitMQ-ESB-Mediation...

https://help.talend.com/reader/YtJvt25ynUgZ~sfL~L5dAg/~Frg0sDUnO_FZaY27Y4GVg

it just top from google Smiley Happy

-----------
Four Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

Hi @vapukov

 

thanks for your answer Smiley Happy

 

I already read those help topic/tutorials but I read that it's better/more appropriate to use the cMessagingEndpoint to exchange with RabbitMQ. Maybe it's just the way to read message from RabbitMQ and not to send message ?

 

Maybe I should use the cAMQP to send message ? I tried it and getting an other error as you can see in attachment. 

 

the cMQConnectionFactory is configured with

 

  • AMQP1.0 (I have activated the plugin 1.0 on my RabbitServer)
  • my IP
  • Port : 5672
  • auth : my login/pass

The cSetBody is a "simple" type, with "Hello World"

 

I hope you can help 

 

Thanks a lot for your time

 

 

 

 

 

Forteen Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

think You miss from - https://community.talend.com/t5/Design-and-Development/RabbitMQ-pub-sub-pattern-using-cMQConnectionF...

 

it very critical for properties, like - durable, auto-delete and etc
by default from Talend it come - both false, and if on Server side any of them enabled - Talend can not connect to server

it work with both variants, but You must mange Your settings:

- from RabbitMQ side - check properties for Exchange/Queue
- from Talend Side - use Advanced settings for add specific properties

 P.S. Start from simple case:
- create exchange - Direct/Transiting
- create queue - Transiten/Auto-delete None
- bind queue to exchange
- test
it should work
then start play with settings

 

 

-----------
Four Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

Hi @vapukov

 

Sorry for the late answer, i was on vacation. I'm sorry, i still do not understand. I gave up using :

 

cTimer - CsetBody - cAMQP - cLog

 

It wasnt working.

 

here is my actual Job, you can see the properties. It create the Queue (persistant).

 

I still dont understand how to set up the message to push in the queue ...

 

Thanks again for your help

 

2018-05-14_1837.png

 

Four Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

Hello

 

any chance you can help me ? Here is my job, I want to change the setbody "Hello world" with a JSON to send as message in the queue

 

2018-05-22_1825.png

 

 

Thanks a lot for your time

Six Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

Hy remi13,

if you want to send a JSON in the cSetBody element, I guess, you can put just the json value in the expression field. See below the first image and after you can see the log, how value appears in the message:
rabbitmq_json.jpgrabbitmq_json_2.jpg

Anyway, this camel component is a little bit tricky, if you want to send or you want to recieve messages. My experience is: if this -cMessagingEndpoint- component is the first componenet in one of your route, the this componenet acts like a message consumer >> cMessagingEndpoint-cLog. If this component not the first and there is a message create componenet before, it acts like a message sender >> cTimer-cSetBody-cMessagingEndpoint. 

Best regards
Viktor

Four Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

Hello

 

thansk a lot for your answer. We made an API and call it from Talend to add the message in queue.

 

Your solution seems to be ok, we already tried it but it was not possible to get the content of the message from an other component. I mean, we would like to get the message in setBody from a CSV for example.

 

Do you know how to do that ?

 

 

Six Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

Try to use Simple language and the expression: "${in.body}". I could read the file content in the message payload. 

 

csvfileContent.jpg

You can read more about simple language here. There are some useful variable, you can access more things.

Hope this helps!

Viktor

Four Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

thanks for your reply , i will try that !

Eight Stars

Re: Create a message on RabbitMQ using cMessagingEndPoint

Ummh... no need to use a cSetBody component and give it the in.body property : it does ... nothing ! 

The cFile or cMessagingEndpoint components already put the file content into the message body.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads