-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Hi there! My team currently uses ActiveMQ as a centralized queue between all of our microservices, and we've adopted this gem to interact with ActiveMQ. I've been scratching my head for a little while, as it seems like the connection inevitably drops after 20 minutes. Here's a simplified version of what we're using:
client = Stomp::Client.new(
hosts: [
login: ENV['STOMP_USERNAME'],
passcode: ENV['STOMP_PASSCODE'],
host: ENV['STOMP_HOST'],
port: ENV['STOMP_PORT'],
ssl: true
],
connect_headers: {
'client-id' => 'my-service',
'accept-version' => '1.2',
'host' => 'localhost'
}
)
client.subscribe('queue/1', id: SecureRandom.uuid, ack: 'client') do |msg|
Handler1.perform_async(msg)
client.acknowledge(msg)
end
client.subscribe('queue/2', id: SecureRandom.uuid, ack: 'client') do |msg|
Handler2.perform_async(msg)
client.acknowledge(msg)
end
client.joinRunning this locally, the client will trigger on_miscerr and reconnect after about 10 minutes, but against Amazon MQ, the connection will drop but the client does not attempt a reconnect.
With a custom logger logging every transaction here, the client receives an on_receive event, and then drops the connection. Do you have any suggestions for how I could go about debugging this issue? I've tried just about every parameter on the client, and logged everything I can. If it helps, this client is running within a Kubernetes pod, pointing at a VPC only configuration of Amazon ActiveMQ.