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

Implement mqtt message expiry #640

Merged
merged 4 commits into from
Dec 22, 2023
Merged

Conversation

bmaidics
Copy link
Contributor

No description provided.

@bmaidics bmaidics self-assigned this Dec 13, 2023
@@ -1455,6 +1461,7 @@ private void onKafkaData(
expireInterval = timestamp + helper.timeout - now().toEpochMilli();
if (expireInterval < 0)
{
expiredMessage = true;
Copy link
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
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