rebus-org / Rebus.MySql

:bus: MySQL integration for Rebus
https://mookid.dk/category/rebus
Other
7 stars 6 forks source link

Change connection string at runtime #29

Closed idoroshenko closed 11 months ago

idoroshenko commented 1 year ago

Hi,

We are in process of migrating to the AWS Aurora MySQL. We use the IAM authentication which requires to generate a token every 15 minutes, details by this link https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/UsingWithRDS.IAMDBAuth.Connecting.NET.html

So, every 15 minutes we need to generate a token and put it in the connection string. The logic in our app wasn't an issue. The issue is with Rebus sagas connected to a MySQL DB.

Is there any way to reset the connection string in the SagaStorage, or assign a new storage or connection helper to the rebus instance?

mookid8000 commented 1 year ago

So, every 15 minutes we need to generate a token and put it in the connection string.

Isn't it possible for you to use the AccessToken field of SqlConnection?

mookid8000 commented 11 months ago

Hi there, I assume you got it fixed somehow 🙂 let me know if this isn't the case.