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

Retained messages not received from bridge at first startup #701

Closed
lrodorigo opened this issue Feb 19, 2018 · 2 comments
Closed

Retained messages not received from bridge at first startup #701

lrodorigo opened this issue Feb 19, 2018 · 2 comments

Comments

@lrodorigo
Copy link

lrodorigo commented Feb 19, 2018

I am using mosquitto v1.4.12 in eclipse-mosquitto Docker image.

Hello, I am performing some tests in the following scenario.
I have two brokers, Broker A (in my LAN, no public IP) and Broker B (public IP, deployed on the cloud) connected through bridge functionality (A connects to B).

Broker A configuration:

connection cloud
address <server IP>
topic # both 2
bridge_protocol_version mqttv311

I am using default values for the other settings.

If I publish a retained message when both Broker A and Broker B are active I am able to receive the message both from clients connected to Broker A and from clients connected to Broker B.

Instead I noticed a problem in the following case.

I shutdown Broker B, publish a retained message on Broker A. Then, I activate Broker B.
Clients that connect to Broker B do not receive the retained message (until I manually re-publish the retained message on A), i.e. it seems that Broker B does not retrieve retained messages from Broker A at startup.

Conversely, in case I shutdown Broker A, publish a retained message on B and, then, activate Broker A again, retained message is received both from clients connected on A and clients connected on B.

Thanks in advance for your help.

@karlp
Copy link
Contributor

karlp commented Mar 14, 2018

I'm seeing the same thing with develop branch.

Broker "local" has outbound, qos1 topic mapping to "remote"
publish retained to local.
restart "remote" broker -> clients connecting to remote don't see the retained messages.

@ralight
Copy link
Contributor

ralight commented Sep 25, 2018

This is fixed in my local fixes branch and will become part of 1.5.3 shortly.

@ralight ralight closed this as completed Sep 25, 2018
ralight added a commit that referenced this issue Sep 27, 2018
This occurred when a bridge connected for the first time and so made a
local subscription for outgoing topics.

Closes #701.
ralight added a commit that referenced this issue Nov 8, 2018
This occurred when a bridge connected for the first time and so made a
local subscription for outgoing topics.

Closes #701.
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants