Amazon MQ Active/Standby Issue
See original GitHub issueI am using this library to connect to Amazon MQ Single Broker and it works as expected.
When I am trying to connect to an Active/Standby broker I get protocol_error
. I used the reconnect example.
rhea:reconnect [d1063682-cb50-40fb-b561-47c5e423a8e6] reconnecting... +0ms
rhea:io [62e8999d-281f-4935-9ce5-fe94863a3a34] connected x.x.x.x:59259 -> x.x.x.x:5671 +501ms
rhea:frames [62e8999d-281f-4935-9ce5-fe94863a3a34] -> { protocol_id: 3, major: 1, minor: 0, revision: 0 } +595ms
rhea:io [62e8999d-281f-4935-9ce5-fe94863a3a34] read 7 bytes +261ms
rhea:events [62e8999d-281f-4935-9ce5-fe94863a3a34] Connection got event: protocol_error +561ms
rhea-promise:connection [62e8999d-281f-4935-9ce5-fe94863a3a34] connection got event: 'protocol_error'. Re-emitting the translated context. +560ms
rhea-promise:translate [] Translating the context for event: 'protocol_error'. +561ms
I can also see this using connection.on
to capture protocol errors
{ [ProtocolError: Invalid protocol header for AMQP ]
message: 'Invalid protocol header for AMQP \u0015\u0003\u0003\u0000',
name: 'ProtocolError' }
connectionOption:
this.connectionOptions = {
connection_details: () => {
const parsedUri = URI.parse(activeMQURIS[this.attempt % activeMQURIS.length]);
// @ts-ignore
const detail: ConnectionDetails = {
host: `${parsedUri.host}`,
port: Number(parsedUri.port).valueOf(),
};
this.attempt++;
return detail;
},
container_id: uuid.v4(),
id: uuid.v4(),
password: activeMQPassword,
reconnect: true,
transport: "tls",
username: activeMQUser,
};
Can’t figure out how to solve this. Your help will be much appreciated.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Amazon MQ active/standby broker for high availability
An active/standby broker is comprised of two brokers in two different Availability Zones, configured in a redundant pair . These brokers communicate ...
Read more >Amazon MQ active/standby broker for high availability
If one of the broker instances malfunctions or undergoes maintenance, it takes Amazon MQ a short while to take the inactive instance out...
Read more >Cause a broker failover - AmazonMQ Workshop For ActiveMQ
You have successfully seen how the Amazon MQ Active-Standby model works, where rebooting the Active broker caused a very small glitch and then...
Read more >AmazonMQ active/standby mode failover time - Stack Overflow
Amazon mq active/standby mode does requires a promotion time to switch standby broker to active mode. Need to use Network of brokers in ......
Read more >AWS MQ Best Practices - Trend Micro
Ensure that your Amazon MQ brokers are using the active/standby deployment mode. MQ Desired Broker Instance Type. Ensure that all your Amazon MQ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For any other Amazon MQ users hitting this page (and maintainers of rhea), while I ran into the same result initially, adding
transport:"tls"
to my connection options did the trick. (I also realized this had nothing to do with their ActiveMQ broker, just my lack of tls configuration. )I implemented this way. I think that will solve