Skip to content

Implement mqtt message expiry - #640

Merged
jfallows merged 4 commits into
aklivity:developfrom
bmaidics:message_expiry
Dec 22, 2023
Merged

jfallows merged 4 commits into
aklivity:developfrom
bmaidics:message_expiry

Conversation

@bmaidics

Copy link
Copy Markdown
Contributor

No description provided.

@bmaidics bmaidics self-assigned this Dec 13, 2023
expireInterval = timestamp + helper.timeout - now().toEpochMilli();
if (expireInterval < 0)
{
expiredMessage = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

long expireInterval;
if (helper.timeout != -1)
{
   ...
}
else
{
    expireInterval = helper.timeout;
}

can this be simplified to:

long expireInterval = -1;
if (helper.timeout != -1)
{
   ...
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally I wanted to write this like you showed. But as we're using the expireInterval in a lambda we'd get:
"Variable used in lambda expression should be final or effectively final".

@bmaidics bmaidics linked an issue Dec 22, 2023 that may be closed by this pull request
@bmaidics bmaidics added the enhancement New feature or request label Dec 22, 2023
@jfallows
jfallows merged commit cf84766 into aklivity:develop Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support MQTT message expiry in mqtt-kafka mapping

2 participants