bi-frost 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/bifrost/message.rb +1 -1
- data/lib/bifrost/version.rb +1 -1
- data/spec/bifrost/message_spec.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90e78824096123ba6bb0fd116ce9d26160b9ce75
|
4
|
+
data.tar.gz: e3e59050c9f7b6322c7b565d165249ab420b830f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af54f96b24f16e7d81401e355bb9c3a54784dd0503e8afc38596124d18634ce60b456cb91dbe86cf5d0376f1b32235d8c6be45436f8edcbd778d5fa365e0e68
|
7
|
+
data.tar.gz: b125fedad0f351203691cf7f9b62bfb7f75d0ed328d524104990eea04065f1a33362b4c86aeca7e20e0f4dc4ead9c70ca3bf7b618f90538564e06a12b3928472
|
data/README.md
CHANGED
@@ -76,7 +76,7 @@ message = Bifrost::Message.new(content: 'some data', 'message subject')
|
|
76
76
|
message.publish(topic)
|
77
77
|
```
|
78
78
|
|
79
|
-
An alternative method named `publish!` also exists. This method raises an error is a message cannot be delivered. The error raised is `Bifrost::Exceptions::MessageDeliveryError`. If the message is successfully delivered with the method `publish!`, the messages `UUID` is returned in the call.
|
79
|
+
An alternative method named `publish!` also exists. This method raises an error is a message cannot be delivered. The error raised is `Bifrost::Exceptions::MessageDeliveryError`. If the message is successfully delivered with the method `publish!`, the messages `UUID` is returned in the call. If a message is re-delivered it's message identifier changes. In the Bifrost each message even if it contains duplicate information is viewed as a different/unique message.
|
80
80
|
|
81
81
|
Subscribers in the Bifrost are [actors](http://http://doc.akka.io/docs/akka/2.4/general/actors.html), these actors run in their own threads. At present the Bifrost does not support thread pools, this is something we are investigating and are hoping to add at some point. In the Bifrost each actor is referred to as a `worker`. A worker is designed to receive
|
82
82
|
messages published to a particular topic with a specific subscriber in mind (refer to the fan-out comment earlier).
|
data/lib/bifrost/message.rb
CHANGED
data/lib/bifrost/version.rb
CHANGED
@@ -9,7 +9,7 @@ module Bifrost
|
|
9
9
|
|
10
10
|
# The patch version of Bifrost, updated only for bug fixes from the last
|
11
11
|
# feature release.
|
12
|
-
PATCH_VERSION =
|
12
|
+
PATCH_VERSION = 2
|
13
13
|
|
14
14
|
# The full version as a string.
|
15
15
|
VERSION = "#{MAJOR_VERSION}.#{MINOR_VERSION}.#{PATCH_VERSION}".freeze
|
@@ -52,6 +52,20 @@ describe Bifrost::Message do
|
|
52
52
|
topic.delete
|
53
53
|
end
|
54
54
|
|
55
|
+
it 'should update the message id on a replublish of the same messsage' do
|
56
|
+
topic = Bifrost::Topic.new('valid-topic')
|
57
|
+
topic.save
|
58
|
+
topic.add_subscriber(Bifrost::Subscriber.new('new_subscriber'))
|
59
|
+
response = message.publish!(topic)
|
60
|
+
expect(response).not_to be_nil
|
61
|
+
expect(message.status).to eq(:delivered)
|
62
|
+
expect(message.message_id).not_to be_nil
|
63
|
+
expect(response).to eq(message.message_id)
|
64
|
+
upd_response = message.publish!(topic)
|
65
|
+
expect(upd_response).not_to eq(response)
|
66
|
+
topic.delete
|
67
|
+
end
|
68
|
+
|
55
69
|
it 'should raise an exception upon publish to an invalid topic' do
|
56
70
|
topic = Bifrost::Topic.new('invalid-topic')
|
57
71
|
expect { message.publish!(topic) }.to raise_error(Bifrost::Exceptions::MessageDeliveryError)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bi-frost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shirren Premaratne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: azure
|