This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathapplication.conf
102 lines (78 loc) · 3.52 KB
/
application.conf
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Configuration file [HOCON format]
// @see http://doc.akka.io/docs/akka/2.4.10/scala/logging.html
akka {
# Options: OFF, ERROR, WARNING, INFO, DEBUG
loglevel = "DEBUG"
}
iothub-react {
// Connection settings can be retrieved from the Azure portal at https://portal.azure.com
// For more information about IoT Hub settings, see:
// https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-create-through-portal#endpoints
// https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-java-java-getstarted
connection {
// see: Endpoints ⇒ Messaging ⇒ Events ⇒ "Event Hub-compatible name"
hubName = ${?IOTHUB_EVENTHUB_NAME}
// see: Endpoints ⇒ Messaging ⇒ Events ⇒ "Event Hub-compatible endpoint"
hubEndpoint = ${?IOTHUB_EVENTHUB_ENDPOINT}
// see: Endpoints ⇒ Messaging ⇒ Events ⇒ Partitions
hubPartitions = ${?IOTHUB_EVENTHUB_PARTITIONS}
// see: "IoT Hub" ⇒ your hub ⇒ "Shared access policies"
// e.g. you should use the predefined "service" policy
accessPolicy = ${?IOTHUB_ACCESS_POLICY}
// see: Shared access policies ⇒ key name ⇒ Primary key
accessKey = ${?IOTHUB_ACCESS_KEY}
// see: Shared access policies ⇒ key name ⇒ Connection string ⇒ "HostName"
accessHostName = ${?IOTHUB_ACCESS_HOSTNAME}
}
streaming {
// see: "IoT Hub" >> your hub > "Messaging" >> Consumer groups
// "$Default" is predefined and is the typical scenario
consumerGroup = "$Default"
// Value expressed as a duration, e.g. 3s, 3000ms, "3 seconds", etc.
receiverTimeout = 3s
// How many messages to retrieve on each pull, max is 999
receiverBatchSize = 999
// Whether to retrieve information about the partitions while streming events from IoT Hub
retrieveRuntimeInfo = true
}
checkpointing {
// Checkpoints frequency (best effort), for each IoT hub partition
// Min: 1 second, Max: 1 minute
frequency = 5s
// How many messages to stream before saving the position, for each IoT hub partition.
// Since the stream position is saved in the Source, before the rest of the
// Graph (Flows/Sinks), this provides a mechanism to replay buffered messages.
// The value should be greater than receiverBatchSize
countThreshold = 5
// Store a position if its value is older than this amount of time, ignoring the threshold.
// For instance when the telemetry stops, this will force to write the last offset after some time.
// Min: 1 second, Max: 1 hour. Value is rounded to seconds.
timeThreshold = 10s
storage {
// Value expressed as a duration, e.g. 3s, 3000ms, "3 seconds", etc.
rwTimeout = 5s
// Supported types (not case sensitive): Cassandra, AzureBlob
backendType = "Cassandra"
// If you use the same storage while processing multiple streams, you'll want
// to use a distinct table/container/path in each job, to to keep state isolated
namespace = "iothub-react-checkpoints"
azureblob {
// Time allowed for a checkpoint to be written, rounded to seconds (min 15, max 60)
lease = 15s
// Whether to use the Azure Storage Emulator
useEmulator = false
// Storage credentials
protocol = "https"
account = ${?IOTHUB_CHECKPOINT_ACCOUNT}
key = ${?IOTHUB_CHECKPOINT_KEY}
}
// You can easily test this with Docker --> docker run -ip 9042:9042 --rm cassandra
cassandra {
cluster = "localhost:9042"
replicationFactor = 1
username = ""
password = ""
}
}
}
}