Module: Messaging::Controls::Metadata
- Defined in:
- lib/messaging/controls/metadata.rb
Defined Under Namespace
Modules: New, Random, Written
Constant Summary
collapse
- Empty =
New
Class Method Summary
collapse
Class Method Details
.causation_message_global_position ⇒ Object
33
34
35
|
# File 'lib/messaging/controls/metadata.rb', line 33
def self.causation_message_global_position
111
end
|
.causation_message_identifier ⇒ Object
53
54
55
|
# File 'lib/messaging/controls/metadata.rb', line 53
def self.causation_message_identifier
"#{causation_message_stream_name}/#{causation_message_position}"
end
|
.causation_message_position ⇒ Object
29
30
31
|
# File 'lib/messaging/controls/metadata.rb', line 29
def self.causation_message_position
11
end
|
.causation_message_stream_name ⇒ Object
25
26
27
|
# File 'lib/messaging/controls/metadata.rb', line 25
def self.causation_message_stream_name
"someCausation"
end
|
.correlation_stream_name ⇒ Object
37
38
39
|
# File 'lib/messaging/controls/metadata.rb', line 37
def self.correlation_stream_name
"someCorrelation"
end
|
.data ⇒ Object
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
# File 'lib/messaging/controls/metadata.rb', line 73
def self.data
{
stream_name: stream_name,
position: position,
global_position: global_position,
causation_message_stream_name: causation_message_stream_name,
causation_message_position: causation_message_position,
causation_message_global_position: causation_message_global_position,
correlation_stream_name: correlation_stream_name,
reply_stream_name: reply_stream_name,
properties: Properties.example,
local_properties: LocalProperties.example,
time: time,
schema_version: schema_version
}
end
|
.example ⇒ Object
4
5
6
7
8
9
10
11
|
# File 'lib/messaging/controls/metadata.rb', line 4
def self.example
data = self.data
data[:properties] = properties
data[:local_properties] = local_properties
Messaging::Message::Metadata.build(data)
end
|
.global_position ⇒ Object
21
22
23
|
# File 'lib/messaging/controls/metadata.rb', line 21
def self.global_position
222
end
|
.identifier ⇒ Object
49
50
51
|
# File 'lib/messaging/controls/metadata.rb', line 49
def self.identifier
"#{stream_name}/#{position}"
end
|
.local_properties ⇒ Object
69
70
71
|
# File 'lib/messaging/controls/metadata.rb', line 69
def self.local_properties
LocalProperties.example
end
|
.position ⇒ Object
17
18
19
|
# File 'lib/messaging/controls/metadata.rb', line 17
def self.position
1
end
|
.properties ⇒ Object
57
58
59
|
# File 'lib/messaging/controls/metadata.rb', line 57
def self.properties
Properties.example
end
|
.reply_stream_name ⇒ Object
41
42
43
|
# File 'lib/messaging/controls/metadata.rb', line 41
def self.reply_stream_name
"someReply"
end
|
.schema_version ⇒ Object
45
46
47
|
# File 'lib/messaging/controls/metadata.rb', line 45
def self.schema_version
'1.1'
end
|
.stream_name ⇒ Object
13
14
15
|
# File 'lib/messaging/controls/metadata.rb', line 13
def self.stream_name
'someSource'
end
|
.time ⇒ Object
61
62
63
|
# File 'lib/messaging/controls/metadata.rb', line 61
def self.time
Time::Raw.example
end
|