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

Add support for originals in message #81

Closed
arnecls opened this issue Apr 3, 2017 · 1 comment
Closed

Add support for originals in message #81

arnecls opened this issue Apr 3, 2017 · 1 comment

Comments

@arnecls
Copy link
Contributor

arnecls commented Apr 3, 2017

The intention of this task is to ease development for plugin writers regarding spooling support and adds more consistency to the way messages are modulated and forwarded.
By removing the support for message modification from the routers we can define an "original" to be generated by the consumer and can be sure no additional modification has been made before the message reaches a producer. By dropping only original messages we avoid double-formatting of messages e.g. sent to a spooling producer.

  • The message generated from by a consumer AFTER applying modulators is seen as "original"
  • A function "CloneOriginal" has to be implemented in the Message struct
  • Remove formatter support from routers (see Rename "stream" plugins to "router" #80)
  • When dropping a message a clone of the original is ALWAYS dropped (with streams set correctly)
  • Modulating of messages has to move out of the concrete producer implementation unless SimpleProducer is used as a base struct (i.e. as of the current state BufferedProducer calls Modulate)
  • Storing / generating originals has to be removed from all producers doing such a thing
@arnecls
Copy link
Contributor Author

arnecls commented Apr 19, 2017

@msiebeneicher from our discussion:

type Message struct {
	data		MessageData
	orig		MessageData
	prevStreamID	MessageStreamID // history
	source		MessageSource   // back channel	  <- optional
	timestamp	time.Time	// time of creation  
	sequence	uint64		// weak ordering     <- raus?
}

type MessageData struct {
	key		[]byte		// later
	payload		[]byte
	streamID	MessageStreamID
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants