| Summary: | Server extensibility through asynchronous messaging (publishing of MQTT events) | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | John Arthorne <john.arthorne> |
| Component: | Server | Assignee: | Anthony Hunter <ahunter.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | pascal, simon_kaegi |
| Version: | unspecified | ||
| Target Milestone: | 6.0 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
John Arthorne
There is some initial work in progress in this branch: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/log/?h=johna/434888 I've been wondering if something like this might be useful for our tasks service and decoupling the various pieces. That might involve having a bus... Yes I was wondering about that too. It depends on if we can get the right level of "stickiness" so the data is around long enough. (In reply to John Arthorne from comment #0) > As a starting point, we should add the Paho MQTT client into Orion, and > start publishing significant changes as events. This will rely on an > administrator connecting Orion to an external message bus, rather than > bundling an message bus implementation with the Orion server. This is the > bundle with the client: > > org.eclipse.paho.client.mqttv3 > > There is a repository available here: > > https://repo.eclipse.org/content/repositories/paho-releases/ I am not sure how we would like to add this bundle into Orion. Paho does not have an update site, so it does not conveniently fit into our existing orion.target. Should we add the mqtt-client-0.4.0.jar directly into a lib folder in one of the Orion bundles? (In reply to Anthony Hunter from comment #4) > Should we add the mqtt-client-0.4.0.jar directly into a lib folder in one of > the Orion bundles? We talked during Orion planning call and decided on this approach for now. Progress to date is in this branch: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?h=ah-Bug434888 I have pushed the changes to master.
To turn on the event service, you need to specify the URI for the MQTT message broker in your orion.conf as:
orion.events.uri=tcp://localhost:1883
You can also optionally provide a user and password for the broker:
orion.events.user={username}
orion.events.password={password}
Currently the only messages that are published are login events as:
Received PUBLISH (d0, q0, r0, m0, 'orion/login', ... (70 bytes))
{"event":"login","published":"2014-05-29T16:20:17.012Z","user":"anthonyh"}
So the topic is "orion/login" and the message is the event in JSON format.
We can make more progress on this enhancement during Orion 7.0 by adding the events and support clients require.
Added some further information to the admin guide: https://wiki.eclipse.org/Orion/Server_admin_guide#Turning_on_Asynchronous_Messaging |