Skip to content

Support MQTT message expiry in mqtt-kafka mapping #631

Closed

Description

@jfallows

Kafka messages natively expire based on topic retention policy rather than any setting on individual messages, whereas individual MQTT messages can expire independently.

MQTT v3.1.1 has no support for message expiry, but message expiry should still be honored for messages published via MQTT v5.
MQTT v5 CONNECT will message expiry interval
MQTT v5 PUBLISH message expiry interval

When message expiry interval is omitted, the message does not expire.

When message is delivered by MQTT server to client, message expiry interval must be adjusted for any wait time.

Therefore, it may be helpful to compute expiry as an absolute value based on Kafka message timestamp plus expiry interval and adjust during delivery.

Note: if expiry interval has already elapsed then the message should be filtered out and not delivered to an MQTT subscriber.

Note: retained messages that have already expired should not be delivered to an MQTT subscriber.

Activity

  1. added
    enhancement
    on Dec 11, 2023
  2. linked a pull request that will close this issueImplement mqtt message expiry #640on Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions