Bug 432561 - Provide Cloud Event Bus Service
Summary: Provide Cloud Event Bus Service
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: gyrex (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Andreas Mihm CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2014-04-10 16:44 EDT by Andreas Mihm CLA
Modified: 2018-03-19 11:59 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Mihm CLA 2014-04-10 16:44:46 EDT
In Gyrex clusters we currently don't have any event distribution mechanism between the nodes of a cluster.
Comment 1 Gunnar Wagenknecht CLA 2014-04-11 03:02:56 EDT
Modified summary to better reflect the goal proposed by the review.
https://git.eclipse.org/r/24823

Andreas, thanks for bringing this up. Would like to get this into 1.3 if possible. Let's continue on the Gerrit review.

Assigning to you because you provided the review. :)
Comment 2 Gunnar Wagenknecht CLA 2014-04-14 07:50:49 EDT
Andreas, see https://git.eclipse.org/r/24955 for a proposal for a more broad distributed event bus which is capable of working with different event types.
Comment 3 Gunnar Wagenknecht CLA 2014-05-19 06:46:59 EDT
FYI: https://git.eclipse.org/r/24955 is about to be merged into master. It includes the EventBus OSGi service which can be used. It also supports dependency injection of ITopic instances.
Comment 4 Gunnar Wagenknecht CLA 2014-05-22 12:52:47 EDT
Merged https://git.eclipse.org/r/24955.

Now awaiting the web socket based implementation. :)
Comment 5 Andreas Mihm CLA 2014-06-13 09:55:54 EDT
When testing the websocket based impl, I use a cluster of three nodes. The event is correctly sent out from the origin node to the two others. On one node it is received and processed correctly, but on the other node I get the following exception:

13:14:41.497 [qtp619071041-28] WARN  o.e.g.e.w.i.EventMessageReceiver - Unhandled Error (closing connection)
java.lang.NullPointerException: null
        at org.eclipse.gyrex.eventbus.internal.Topic.dispatchEvent(Topic.java:138) ~[na:na]
        at org.eclipse.gyrex.eventbus.internal.EventService$TopicEventReceiver.receiveEvent(EventService.java:69) ~[na:na]
        at org.eclipse.gyrex.eventbus.websocket.internal.WebsocketEventTransport.distributeEventToSubscribers(WebsocketEventTransport.java:271) ~[na:na]
        at org.eclipse.gyrex.eventbus.websocket.internal.WebsocketEventTransport$4.onEventMessage(WebsocketEventTransport.java:342) ~[na:na]
        at org.eclipse.gyrex.eventbus.websocket.internal.EventMessageReceiver.onWebSocketBinary(EventMessageReceiver.java:53) ~[na:na]


All nodes operate on the same codebase, I'm still in investigation, whats going on here
Comment 6 Andreas Mihm CLA 2014-06-14 11:25:11 EDT
found the problem: The EventMessage Object isn't designed to be sent more than once, becaus ethe ByteBuffer payload is read out, when sending the event to the first node, sending the same eventMessage to the next node results in an already empty payload
Comment 7 Gunnar Wagenknecht CLA 2014-06-14 11:53:27 EDT
Oh well... https://git.eclipse.org/r/28525
Comment 8 Gunnar Wagenknecht CLA 2014-06-14 12:27:55 EDT
Confirmed the fix by writing a unit test.
Comment 9 Gunnar Wagenknecht CLA 2014-06-14 13:17:27 EDT
Andreas, I'm marking this as fixed because 1.3 is done. Please open new bugs for problems found in the current implementation.