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

Reconnect not working if nats down #17

Open
mikekuzak opened this issue Nov 10, 2022 · 0 comments
Open

Reconnect not working if nats down #17

mikekuzak opened this issue Nov 10, 2022 · 0 comments

Comments

@mikekuzak
Copy link

Running in Docker:
nats-brigde: NATS-MQ Bridge ProductVersion=0.5.0
nats: 2.8.4

nats: {
  Servers: ["nats.containersqa.company.com:4222"],
  ConnectTimeout: 5000,
  MaxReconnects: 5,
  ReconnectWait: 5000,
}

When I stop the nats container, and then restart again, the nats-brigde is not reconnecting.

2022/11/10 15:03:40.020743 [INF] skipping NATS streaming connection, not configured
2022/11/10 15:03:40.021205 [INF] nats connection is down, will try reconnecting to streaming and restarting connectors in 5000 milliseconds
2022/11/10 15:03:40.021214 [INF] trying to reconnect to nats streaming
2022/11/10 15:03:40.021216 [INF] skipping NATS streaming connection, not configured
2022/11/10 15:03:40.021696 [INF] nats connection is down, will try reconnecting to streaming and restarting connectors in 5000 milliseconds
2022/11/10 15:03:40.021705 [INF] trying to reconnect to nats streaming
2022/11/10 15:03:40.021706 [INF] skipping NATS streaming connection, not configured

I have to restart the nats-brigde container, then it's working again.

2022/11/10 15:06:38.773229 [INF] loading configuration from "/mqbridge.conf"
2022/11/10 15:06:38.773440 [INF] starting MQ-NATS bridge, version 0.5
2022/11/10 15:06:38.773452 [INF] server time is Thu Nov 10 15:06:38 UTC 2022
2022/11/10 15:06:38.773455 [INF] connecting to NATS core
2022/11/10 15:06:38.775764 [INF] skipping NATS streaming connection, not configured
2022/11/10 15:06:38.775798 [TRC] starting connection Queue:MCM.NATS.MRS.LIS.IN to NATS:mars.lis
2022/11/10 15:06:38.795788 [TRC] connected to queue manager QM_MCM_DEV at mq-dev.company.com(1414) as MCM.CH.ENT for Queue:MCM.NATS.MRS.LIS.IN to NATS:mars.lis
2022/11/10 15:06:38.796214 [TRC] setting up callback for Queue:MCM.NATS.MRS.LIS.IN to NATS:mrs.lis
2022/11/10 15:06:38.796357 [TRC] opened and reading MCM.NATS.MRS.LIS.IN
2022/11/10 15:06:38.796365 [INF] started connection Queue:MCM.NATS.MRS.LIS.IN to NATS:mrs.lis
2022/11/10 15:06:38.796588 [INF] starting http monitor on :9090
2022/11/10 15:06:38.797138 [TRC] Queue:MCM.NATS.MRS.LIS.IN to NATS:mrs.lis got raw mq message with body of length 596
2022/11/10 15:06:38.798088 [TRC] Queue:MCM.NATS.MRS.LIS.IN to NATS:mrs.lis got raw mq message with body of length 583
2022/11/10 15:06:38.799128 [TRC] Queue:MCM.NATS.MRS.LIS.IN to NATS:mrs.lis got raw mq message with body of length 589
2022/11/10 15:06:38.799881 [TRC] Queue:MCM.NATS.MRS.LIS.IN to NATS:mrs.lis got raw mq message with body of length 580
2022/11/10 15:06:38.800717 [TRC] Queue:MCM.NATS.MRS.LIS.IN to NATS:mrs.lis got raw mq message with body of length 583
2022/11/10 15:06:38.801527 [TRC] Queue:MCM.NATS.MRS.LIS.IN to NATS:mrs.lis got raw mq message with body of length 636
@mikekuzak mikekuzak changed the title Reconnect not working if Reconnect not working if nats down Nov 10, 2022
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

No branches or pull requests

1 participant