- Disabled resuming on stream.write call to avoid conflicts that may arise from auto-resume in bi-directional stream.
- Refined the logic related to what happens with the message when the pipe point is resumed.
- Added examples of request and response streaming.
- Allow to link on-the-fly in message/request flow, not just at context init time.
- Removed context init from trooba.build() call. Now it should only happen at pipe.create(). Build will only construct the pipeline and cache it with generic context.
- Removed selecting custom API from trooba.build() call. Now one should only use pipe.create(ctx, 'custom-api-name');
- Increased default message TTL to Infinity and added option to configure ttl via config.
pipe.build({
ttl: 2000 // msec
})
- Request/response streaming preserves message order to avoid out-of-order conflicts.
- Changed tracing to use trace function as part of the context
pipe.build()
.create({
trace: function (point, message) {
// collect points
route.push(point.handler.name + '-' + (message.flow === 1 ? 'req' : 'res'))
}
})
.request('request', function () {
console.log(route.join('->'));
});
- link two pipes together on-the-fly, it is good to bootstrap the pipe from config file.
- trace function to trace the routes with simple trace message
- message time-to-live support, default is 1 second.
- Added building pipe from the first to the last handler, before it was reverse order.
- Added 'on' hooks to stream level
- Removed transport and interface to keep trooba more generic
- Cutom API can be injected by the transport handler during init phase as part of context and requested as
The customAPI is arbitrary string key that is bound to the API injected by the handler. For example:
var service = pipe.build('service:hello');
service.hello('John');
- Converted a pipeline into a message bus
- Simplified trooba API
- Support for sync and async messages
- Support for custom messages, request/response, publish/subscribe or a mix