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

Custom session items when injecting application message #1629

Closed
wants to merge 1 commit into from

Conversation

tboothman
Copy link

Optional parameter for session items to be used when publishing a message from the server

See #1627

_sessionItems,
cancellationToken);

public Task InjectApplicationMessage(InjectedMqttApplicationMessage injectedApplicationMessage, ConcurrentDictionary<object, object> sessionItems, CancellationToken cancellationToken = default)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't like the idea to pass in session items for every injected message. The server should behave like a single client.

We may need to expose the session items as a public property for MqttServer. It is currently missing the feature to setup session items externally. This is usually done for clients when they connect but the server has no connection at all so we must prepare the session items somewhere else.

Copy link
Contributor

Choose a reason for hiding this comment

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

As a part of #1635 I added the ability to get session items using the IMqttServerExtensibility interface. Maybe this is a way of exposing it without opening up a SessionItems dictionary to all? This also allows users to supply whatever session items they want by calling directly to the MqttClientSessionsManager.

@chkr1011
Copy link
Collaborator

Closing this PR because a similar change is part of another PR.

@chkr1011 chkr1011 closed this Jan 19, 2023
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.

3 participants