Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持amqp(RabbitMQ) #2156

Merged
merged 1 commit into from
Sep 16, 2019
Merged

支持amqp(RabbitMQ) #2156

merged 1 commit into from
Sep 16, 2019

Conversation

qiqizjl
Copy link
Contributor

@qiqizjl qiqizjl commented Sep 5, 2019

对rabbitmq的支持

topic设置规则等同于rocketMQ和kafka
server端 topic=routekey
adapter端 topic=queue
目前exchnage/routekey/topic的绑定关系需要自行在rabbitmq manager中完成

若填写阿里uid且填写了阿里的ak和sk。则默认为阿里云MQ模式。若不需要则需要留空哦

# Vhost
canal.mq.vhost=
# 交换机
canal.mq.exchange=
# 用户名
canal.mq.username=
# 密码
canal.mq.password=
# 阿里UID
canal.mq.aliyunuid=

@CLAassistant
Copy link

CLAassistant commented Sep 5, 2019

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov-io
Copy link

codecov-io commented Sep 5, 2019

Codecov Report

Merging #2156 into master will decrease coverage by 0.05%.
The diff coverage is 0%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master   #2156      +/-   ##
===========================================
- Coverage      6.15%    6.1%   -0.06%     
  Complexity      197     197              
===========================================
  Files           277     281       +4     
  Lines         26988   27214     +226     
  Branches       3995    4013      +18     
===========================================
  Hits           1661    1661              
- Misses        25063   25289     +226     
  Partials        264     264
Impacted Files Coverage Δ Complexity Δ
...ibaba/otter/canal/client/ConsumerBatchMessage.java 0% <ø> (ø) 0 <0> (?)
.../canal/client/rocketmq/RocketMQCanalConnector.java 0% <ø> (ø) 0 <0> (ø) ⬇️
...nal/client/rabbitmq/AliyunCredentialsProvider.java 0% <0%> (ø) 0 <0> (?)
...a/com/alibaba/otter/canal/common/MQProperties.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...ba/otter/canal/rabbitmq/CanalRabbitMQProducer.java 0% <0%> (ø) 0 <0> (?)
...tter/canal/rabbitmq/AliyunCredentialsProvider.java 0% <0%> (ø) 0 <0> (?)
.../canal/client/rabbitmq/RabbitMQCanalConnector.java 0% <0%> (ø) 0 <0> (?)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 60e26d1...43abd9a. Read the comment docs.

@qiqizjl qiqizjl changed the title 支持amqp(rabbitMQ) 支持amqp(RabbitMQ) Sep 5, 2019
@agapple agapple merged commit 79552e0 into alibaba:master Sep 16, 2019
@agapple
Copy link
Member

agapple commented Sep 16, 2019

tks

public void init(MQProperties mqProperties) {
this.mqProperties = mqProperties;
ConnectionFactory factory = new ConnectionFactory();
factory.setHost(mqProperties.getServers());
Copy link

@JiaRG JiaRG Feb 4, 2020

Choose a reason for hiding this comment

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

ConnectionFactory的hostport属性是分开设置的,这种构造方式存在问题

}
factory.setVirtualHost(mqProperties.getVhost());
try {
connect = factory.newConnection();
Copy link

Choose a reason for hiding this comment

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

connect = factory.newConnection(com.rabbitmq.client.Address.parseAddresses(mqProperties.getServers()));

@yatang
Copy link

yatang commented Dec 7, 2020

tks

@linghengqian
Copy link

It does not seem possible to modify the wiki through PR. The absence of documentation can be confusing to users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants