8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# File 'lib/event_store_client/adapters/http/commands/persistent_subscriptions/create.rb', line 8
def call(stream_name, subscription_name, options: {})
stats = options[:stats] || true
start = options[:start] || 0
retries = options[:retries] || 5
connection.call(
:put,
"/subscriptions/#{stream_name}/#{subscription_name}",
body: {
extraStatistics: stats,
startFrom: start,
maxRetryCount: retries,
resolveLinkTos: true
},
headers: {
'Content-Type' => 'application/json'
}
)
end
|