-
Notifications
You must be signed in to change notification settings - Fork 325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ElasticMQ instead of fake_sqs #3750
Merged
Merged
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
890f1d0
local-setup: Use ElasticMQ instead of fake_sqs for speed
akshaymankar c999638
chrats/fake-aws-sqs: Use ElasticMQ
akshaymankar 8b784ba
Changelog
akshaymankar f190a0f
CI Setup: Create SQS queues using config
akshaymankar fead413
SQSWatcher: Use smaller wait time
akshaymankar d9d31ef
SQSWatcher: Ensure thread being killed is flagged properly
akshaymankar a01e122
SQSWatcher: Use 5 concurrent loops to increase throughput
akshaymankar a35424b
Add comment to explain 5 recieve loops
akshaymankar 6066dd2
Fix typo
akshaymankar 1bf79cf
Explain lack of "2" set of queues
akshaymankar 0e3fa46
brig-integration: Use the queue name for SQSWatcher
akshaymankar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
* Replace fake-sqs with ElasticMQ | ||
|
||
ElasticMQ is an actively maintained project, fake-sqs hasn't seen a commit since | ||
2018. This is not expected to have any noticeable effect on deployments that | ||
don't have any extra configurations for the SQS queues. If the fake-aws-sqs | ||
chart had configured custom queue names, they have couple of extra limitations: | ||
- The queue names must only contain alphanumeric characters and hyphens. | ||
- The FIFO queue names must end in `.fifo`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
app: {{ template "fullname" . }} | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: "{{ .Release.Name }}" | ||
heritage: "{{ .Release.Service }}" | ||
data: | ||
elasticmq.conf: | | ||
include classpath("application.conf") | ||
|
||
# What is the outside visible address of this ElasticMQ node | ||
# Used to create the queue URL (may be different from bind address!) | ||
node-address { | ||
protocol = http | ||
host = localhost | ||
port = {{ .Values.service.httpPort }} | ||
context-path = "" | ||
} | ||
|
||
rest-sqs { | ||
enabled = true | ||
bind-port = {{ .Values.service.httpPort }} | ||
bind-hostname = "0.0.0.0" | ||
# Possible values: relaxed, strict | ||
sqs-limits = strict | ||
} | ||
|
||
rest-stats { | ||
enabled = true | ||
bind-port = 9325 | ||
bind-hostname = "0.0.0.0" | ||
} | ||
|
||
# Should the node-address be generated from the bind port/hostname | ||
# Set this to true e.g. when assigning port automatically by using port 0. | ||
generate-node-address = false | ||
|
||
queues { | ||
{{- range $i, $queueName := .Values.queueNames }} | ||
"{{ $queueName }}" { | ||
{{- if hasSuffix ".fifo" $queueName }} | ||
fifo = true | ||
{{- end }} | ||
} | ||
{{- end }} | ||
} | ||
|
||
messages-storage { | ||
enabled = true | ||
uri = "jdbc:h2:/data/elasticmq.db" | ||
} | ||
|
||
# Region and accountId which will be included in resource ids | ||
aws { | ||
region = eu-west-1 | ||
accountId = 000000000000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
include classpath("application.conf") | ||
|
||
# What is the outside visible address of this ElasticMQ node | ||
# Used to create the queue URL (may be different from bind address!) | ||
node-address { | ||
protocol = http | ||
host = localhost | ||
port = 4568 | ||
context-path = "" | ||
} | ||
|
||
rest-sqs { | ||
enabled = true | ||
bind-port = 4568 | ||
bind-hostname = "0.0.0.0" | ||
# Possible values: relaxed, strict | ||
sqs-limits = strict | ||
} | ||
|
||
rest-stats { | ||
enabled = true | ||
bind-port = 9325 | ||
bind-hostname = "0.0.0.0" | ||
} | ||
|
||
# Should the node-address be generated from the bind port/hostname | ||
# Set this to true e.g. when assigning port automatically by using port 0. | ||
generate-node-address = false | ||
|
||
queues { | ||
default-queue-template { | ||
defaultVisibilityTimeout = 1s | ||
} | ||
|
||
fifo-queue-template { | ||
defaultVisibilityTimeout = 1s | ||
fifo = true | ||
} | ||
|
||
integration-brig-events = ${queues.default-queue-template} | ||
integration-brig-events2 = ${queues.default-queue-template} | ||
integration-brig-events3 = ${queues.default-queue-template} | ||
integration-brig-events4 = ${queues.default-queue-template} | ||
integration-brig-events5 = ${queues.default-queue-template} | ||
integration-brig-events-federation-v0 = ${queues.default-queue-template} | ||
|
||
integration-brig-events-internal = ${queues.default-queue-template} | ||
integration-brig-events-internal2 = ${queues.default-queue-template} | ||
integration-brig-events-internal3 = ${queues.default-queue-template} | ||
integration-brig-events-internal4 = ${queues.default-queue-template} | ||
integration-brig-events-internal5 = ${queues.default-queue-template} | ||
integration-brig-events-internal-federation-v0 = ${queues.default-queue-template} | ||
|
||
"integration-user-events.fifo" = ${queues.fifo-queue-template} | ||
"integration-user-events2.fifo" = ${queues.fifo-queue-template} | ||
"integration-user-events3.fifo" = ${queues.fifo-queue-template} | ||
"integration-user-events4.fifo" = ${queues.fifo-queue-template} | ||
"integration-user-events5.fifo" = ${queues.fifo-queue-template} | ||
"integration-user-events-federation-v0.fifo" = ${queues.fifo-queue-template} | ||
|
||
integration-gundeck-events = ${queues.default-queue-template} | ||
integration-gundeck-events2 = ${queues.default-queue-template} | ||
integration-gundeck-events3 = ${queues.default-queue-template} | ||
integration-gundeck-events4 = ${queues.default-queue-template} | ||
integration-gundeck-events5 = ${queues.default-queue-template} | ||
integration-gundeck-events-federation-v0 = ${queues.default-queue-template} | ||
|
||
"integration-team-events.fifo" = ${queues.fifo-queue-template} | ||
"integration-team-events2.fifo" = ${queues.fifo-queue-template} | ||
"integration-team-events3.fifo" = ${queues.fifo-queue-template} | ||
"integration-team-events4.fifo" = ${queues.fifo-queue-template} | ||
"integration-team-events5.fifo" = ${queues.fifo-queue-template} | ||
"integration-team-events-federation-v0.fifo" = ${queues.fifo-queue-template} | ||
} | ||
|
||
# Region and accountId which will be included in resource ids | ||
aws { | ||
region = eu-west-1 | ||
accountId = 000000000000 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,29 @@ | ||
fake-aws-ses: | ||
enabled: true | ||
sesSender: "backend-integrationk8s@wire.com" | ||
|
||
fake-aws-sqs: | ||
queueNames: | ||
- "integration-brig-events" | ||
- "integration-brig-events-internal" | ||
- "integration-gundeck-events" | ||
- "integration-user-events.fifo" | ||
- "integration-team-events.fifo" | ||
|
||
- "integration-brig-events3" | ||
- "integration-brig-events-internal3" | ||
- "integration-gundeck-events3" | ||
- "integration-user-events3.fifo" | ||
- "integration-team-events3.fifo" | ||
|
||
- "integration-brig-events4" | ||
- "integration-brig-events-internal4" | ||
- "integration-gundeck-events4" | ||
- "integration-user-events4.fifo" | ||
- "integration-team-events4.fifo" | ||
|
||
- "integration-brig-events5" | ||
- "integration-brig-events-internal5" | ||
- "integration-gundeck-events5" | ||
- "integration-user-events5.fifo" | ||
- "integration-team-events5.fifo" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can you leave out the queues with number
2
here? 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number
2
backend runs in another namespace so it actually uses the queues without any suffix.I've added a comment to explain this.