Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[ISSUE #4371] Move Rabbitmq plugin into Connector from Storage plugin moudle#4393

Merged
qqeasonchen merged 14 commits intoapache:masterfrom
fabian4:rabbitmq_plugin
Aug 24, 2023
Merged

[ISSUE #4371] Move Rabbitmq plugin into Connector from Storage plugin moudle#4393
qqeasonchen merged 14 commits intoapache:masterfrom
fabian4:rabbitmq_plugin

Conversation

Copy link
Member

fabian4 commented Aug 23, 2023

Fixes #4371.

Motivation

Explain the content here.
Explain why you want to make the changes and what problem you're trying to solve.

Modifications

Add Connector RabbitMQ.

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
  • If a feature is not applicable for documentation, explain why?
  • If a feature is not documented yet in this PR, please create a followup issue for adding the documentation

Copy link

codecov bot commented Aug 23, 2023 *
edited
Loading

Codecov Report

Merging #4393 (9bec9a8) into master (1babec1) will decrease coverage by 0.02%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

Current head 9bec9a8 differs from pull request most recent head 3f1783f. Consider uploading reports for the commit 3f1783f to get more accurate results

@@ Coverage Diff @@
## master #4393 +/- ##
============================================
- Coverage 17.85% 17.83% -0.02%
Complexity 1514 1514
============================================
Files 602 602
Lines 25518 25514 -4
Branches 2400 2398 -2
============================================
- Hits 4555 4551 -4
+ Misses 20524 20522 -2
- Partials 439 441 +2

see 7 files with indirect coverage changes

We're building smart automated test selection to slash your CI/CD build times. Learn more

pandaapo reviewed Aug 23, 2023
Copy link
Member

pandaapo left a comment *
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you verify if the bug #4394 still exists after you move RabbitMQ storage plugin?

Copy link
Member Author

fabian4 commented Aug 23, 2023

It works just fine here when I do my part here.
But the RabbitMQSinkConnector as the rabbitmq-producer in eventmesh-storage-rabbitmq doesn't work at the first time. We need to bind channel with exchangeName and queueName like we do it in the rabbiotmq-consumer Just in case we connect the rabbitmq-server for the first time without creating a binding in rabbitmq-server manually.

rabbitmqClient.binding(channel, sinkConfig.getConnectorConfig().getExchangeType(),
sinkConfig.getConnectorConfig().getExchangeName(),
sinkConfig.getConnectorConfig().getRoutingKey(),
sinkConfig.getConnectorConfig().getQueueName());

To verify RabbitMQSinkConnector

  1. launch your rabbitmq server and eventmesh-runtime.
  2. enable sinkConnector and check sink-config.yml.
pubSubConfig:
meshAddress: 127.0.0.1:10000
subject: TopicTest
idc: FT
env: PRD
group: rabbitmqSink
appId: 5031
userName: rabbitmqSinkUser
passWord: rabbitmqPassWord
connectorConfig:
connectorName: rabbitmqSink
host: your.rabbitmq.server
port: 5672
username: coyrqpyz
passwd: passwd
virtualHost: coyrqpyz
exchangeType: TOPIC
# build-in exchangeName or name a new one after you create it in rabbitmq server.
exchangeName: amq.topic
# rabbitmq server will create the routingKey and queueName automatically after you connect to it if they aren't exist before.
routingKey: eventmesh
queueName: eventmesh
autoAck: true
  1. start your RabbitMQConnectorServer and you will find the channel in rabbitmq server.
  1. send a message to the Topic TopicTest as you defined above and check the result it rabbit console.

To verify RabbitMQSourceConnector

  1. launch your rabbitmq server and eventmesh-runtime.
  2. enable sourceConnector and check source-config.yml (Basically the same as sink-config.yml)
  3. start your RabbitMQConnectorServer and you will find the channel in rabbitmq server.
  4. put a cloudevent message to queue. Then it will be send to eventmesh, you can check it by log or in eventmesh-dashboard
{"version":"V1","data":"{\"content\":\"testAsyncMessage\"}","extensions":{"protocolversion":"1.0","reqeventmesh2mqtimestamp":"1692799850158","rsp0idc":"FT","datacontenttype":"application/cloudevents+json","subject":"TopicTest","reqsendeventmeship":"[fe80:0:0:0:261b:aa79:91fe:28f3%utun2]","reqreceiveeventmeship":"[fe80:0:0:0:261b:aa79:91fe:28f3%utun2]","protocoldesc":"tcp","rsp0sys":"5031","source":"/","type":"cloudevents","ttl":"30000","reqeventmesh2ctimestamp":"1692799850775","reqmq2eventmeshtimestamp":"1692799850771","rsp0ip":"127.0.0.1","protocoltype":"cloudevents","rsp0group":"rabbitmqSink","id":"06315467-9624-47d7-b751-d7e4cd04b452","reqc2eventmeshtimestamp":"1692799850091"}}

fabian4 requested a review from pandaapo August 23, 2023 14:59
xwm1992 approved these changes Aug 24, 2023
Copy link
Member Author

fabian4 commented Aug 24, 2023

FYI I just added a new moudel eventmesh-connector-rabbitmq witout removing eventmesh-storage-rabbitmq in case it is still needed. We may clean it up after it is ready for the community.

qqeasonchen approved these changes Aug 24, 2023
qqeasonchen merged commit fd1102a into apache:master Aug 24, 2023
fabian4 deleted the rabbitmq_plugin branch August 24, 2023 07:48
xuhongjia pushed a commit to Deckers-Ohana/eventmesh that referenced this pull request Mar 13, 2025
[ISSUE apache#4371] Move Rabbitmq plugin into Connector from Storage plugin moudle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

xwm1992 xwm1992 approved these changes

qqeasonchen qqeasonchen approved these changes

pandaapo Awaiting requested review from pandaapo

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Enhancement] Move Rabbitmq plugin into Connector from Storage plugin moudle

4 participants