eventric-remote-inmemory
Version:
eventric InMemory Remote
13 lines (7 loc) • 347 B
text/coffeescript
pubSub = require './pub_sub'
class InMemoryRemoteEndpoint
setRPCHandler: (@handleRPCRequest) ->
publish: (contextName, [domainEventName, aggregateId]..., payload) ->
fullEventName = pubSub.getFullEventName contextName, domainEventName, aggregateId
pubSub.publish fullEventName, payload
module.exports = new InMemoryRemoteEndpoint