-
Notifications
You must be signed in to change notification settings - Fork 16
feat: implement destazureservicebus #437
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,105 @@ | |||
# AzureServiceBus Destination configuration |
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.
This document explains my thought process behind the destination config / credentials and also some further configuration we can support.
const ( | ||
TOPIC_NAME = "destination-test" | ||
SUBSCRIPTION_NAME = "destination-test-sub" | ||
CONNECTION_STRING = "Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;" | ||
) |
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.
After provisioning your resources using the document above, you can replace these constants with your real credentials for testing.
$ go run ./cmd/destinations/azureservicebus
You can also run the Azure emulator and test against it locally too.
# to run Azure emulator
$ make up/azure
internal/destregistry/metadata/providers/azure_servicebus/instructions.md
Outdated
Show resolved
Hide resolved
internal/destregistry/metadata/providers/azure_servicebus/metadata.json
Outdated
Show resolved
Hide resolved
type AzureServiceBusDestinationConfig struct { | ||
Name string | ||
} |
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.
this can potentially be extended further, please check the configuration document for futher information
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.
@alexluong - I've QA's and got events delivering to Service Bus a) topic b) queue 👍
just one comment on the configuration options.
Here are a few notable configuration, especially on the destination level that we may want to support: | ||
|
||
- MessageID --> MessageIDTemplate, similar to AWS Kinesis Parition Key approach | ||
- CorrelationID --> CorrelationIDTemplate, similar to AWS Kinesis Parition Key approach | ||
- PartitionKey --> PartitionKeyTemplate, similar to AWS Kinesis Parition Key approach | ||
|
||
- ScheduledEnqueueTime | ||
- TimeToLive | ||
|
||
The current implementation doesn't support any of these. So when create destination, it's super straightforward: | ||
|
||
```golang | ||
type Config struct { | ||
Name string | ||
} | ||
``` | ||
|
||
If we want to support these, we can either add them to Config, such as `Config.TTL`, or we can also add a suffix like `Config.MessageTTL` to specify that these config would apply to the Message. |
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.
@alexluong let's be consistent across destinations.
Let's also be explicit in our naming so it's clear where the configuration is applied.
internal/destregistry/metadata/providers/azure_servicebus/instructions.md
Outdated
Show resolved
Hide resolved
Merging so we can release the feature. Moved suggested improvements into #443 |
No description provided.