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

tenant default config of event sources #57

Closed
defshine opened this issue Sep 1, 2016 · 1 comment
Closed

tenant default config of event sources #57

defshine opened this issue Sep 1, 2016 · 1 comment

Comments

@defshine
Copy link

defshine commented Sep 1, 2016

Event sources include the mqtt topic,default topic is same for every new tenant, such as "SiteWhere/input/protobuf".
If tenant user don't change this topic, then each tenant subscribe the some topic, so the message will be process by many tenant.

Is it necessary to add special rules for the default topic to distinguish the different tenant ?

@derekadams
Copy link
Member

derekadams commented Sep 4, 2016

There are a few solutions to this problem. One option is to manually update the MQTT topic name on the event source for each tenant you add to the system. Another option is to have a separate MQTT broker for each tenant and update the hostname on a per-tenant basis. Both of these options obviously require manual configuration for each tenant.

Another more comprehensive approach is to update the tenant template to automatically use the tenant id as part of the MQTT topic. For instance, if you update the conf/tenant-template/sitewhere-tenant.xml file and change the topic for the JSON batch topic to be SiteWhere/input/${tenant.id}/jsonbatch, each new tenant will automatically get its own queue based on its unique id.

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

No branches or pull requests

2 participants