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

TxMessageAttempts optionally ignores offline attempts #398

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matth-x
Copy link
Owner

@matth-x matth-x commented Jan 26, 2025

Add build switch MO_TX_ATTEMPT_TIMEOUT to control if a message timeout should increment the TxMessageAttempts counter.

MO only attempts to send messages when the WebSocket is in the connected state. This is, however, no guarantee that the signal strength is sufficient so that the messages actually arrive at the server and in consequence, the attempt fails. During long periods with bad signal strength, the connection could frequently switch between the connected and unconnected states without ever allowing OCPP operations to pass through. MO would effectively drop the offline tx queue then, even though there is nothing wrong with these messages themselves.

The new option MO_TX_ATTEMPT_TIMEOUT allows to control what happens if tx-related messages time out. In the default setting, MO_TX_ATTEMPT_TIMEOUT=1, a timed-out message increments the attempt counter (current behavior). MO_TX_ATTEMPT_TIMEOUT=0 defines that time-outs should leave the attempt counter like before (optional, new behavior).

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.

1 participant