-
Notifications
You must be signed in to change notification settings - Fork 3
/
esb.yml.sample
73 lines (62 loc) · 4.81 KB
/
esb.yml.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
parameters:
beanstalkd: tcp://127.0.0.1:11300 # Beanstalkd connection URI
http_server_port: 34981 # HTTP Server Port
logger_mail_to: [email protected] # Email address where to send significant events mail notifications
logger_mail_from: "From Name <[email protected]>" # From name/address for significant events mail notifications
console_port: 8080 # Web console port
console_username: admin # Web console username
console_password: password # Web console password
console_log_file: /tmp/esb_console.log # Web console server log file
elasticsearch_base_uri: '%env(string:ES_BASE_URI)%' # ElasticSearch base URI (i.e. http://elasticsearch:9200)
services:
_defaults:
autowire: true # This is optional (see https://symfony.com/doc/current/service_container/autowiring.html)
My\Esb\Producer: # A producer service definition
arguments: []
My\Esb\Worker: # A worker service definition
arguments: []
# Keep the following two services definitions if you are going to enable automatic old jobs cleaning
Webgriffe\Esb\Producer\CleanOldJobs:
arguments: ['6 15 * * *'] # The argument is the crontab expression
Webgriffe\Esb\Worker\CleanOldJobs:
arguments: ['@Webgriffe\AmpElasticsearch\Client', 30] # 30 is the number of day after which a job is considered old and is deleted
flows:
sample_flow: # The flow "code" and will be the Beanstalkd tube name
description: Sample Flow # The flow description
es_index_settings: # Optional: the update ElasticSearch index API settings (see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html#update-index-settings-api-request-body). This is useful if you want to control index settings.
index:
mapping:
total_fields:
limit: 2000
es_index_mapping: # Optional: the update ElasticSearch index API mapping (see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html#put-mapping-api-request-body). This is useful if you want to control index mapping.
properties:
title:
type: text
es_index_aliases: # Optional: the update ElasticSearch index API aliases (see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-add-alias.html#add-alias-api-request-body). This is useful if you want to control index aliases.
my_alias:
is_hidden: true
producer:
service: My\Esb\Producer # A producer service ID defined above
batch_size: 1200 # Jobs are produced in batches of 1200 jobs. Optional: default is 1000
worker:
service: My\Esb\Worker # A worker service ID defined above
instances: 1 # The number of worker instances to spawn for this flow
error_retry_delay: 0 # The number of seconds to wait before an errored job can be retried. The default is 0 (errored jobs can be retried immediately). Useful when "retrying later" might solve the problem.
max_retry: 5 # The number of maximum work retries for a job in this tube/flow before being buried
dependencies: # This whole section can be omitted if the current flow has no dependencies
flows: ['other_flow_1', 'other_flow_2'] # Optional: dependencies of this flow toward other flow(s)
delay_after_idle_time: 1000 # Optional: delay that a worker with dependencies waits before working the first job received after the tube was empty
initial_polling_interval: 1000 # Optional: initial polling delay that a worker waits when it has to wait for a dependency that is not idle
maximum_polling_interval: 60000 # Optional: maximum polling delay that a worker waits when it has to wait for a dependency that is not idle
polling_interval_multiplier: 2 # Optional: polling delay increase factor whenever a worker is waiting for a dependency that is not idle
other_flow_1:
# ...
other_flow_2:
# ...
# Keep the following flow definition to enable automatic old jobs cleaning
clean_old_jobs_flow:
description: Cleans jobs for which the last event is older than the given number of days
producer:
service: Webgriffe\Esb\Producer\CleanOldJobs
worker:
service: Webgriffe\Esb\Worker\CleanOldJobs