Masstransit- how to enable Encryption for Amazon queue. I am using AWSSQS queue/topic for messaging purposes & wanted to enable server-side encryption. I am not using ReceiveEndPoint function so please suggest me the way to enable encryption & way to choose between SSE_SQS & SSE_KMS.
I tried with
busRegister.UsingAmazonSqs((context,cfg)=>{
cfg.Host("Region",x=>{
x.AccessKey("x");
x.SecreteKey("Y");
});
cfg.QueueAttributes.Add(QueueAttributeName.SqsManagedSseEnabled, "true");
cfg.QueueAttributes.Add(QueueAttributeName.KmsMasterKeyId, "alias/kmsid");
});
Masstransit- how to enable Encryption for Amazon queue. I am using AWSSQS queue/topic for messaging purposes & wanted to enable server-side encryption. I am not using ReceiveEndPoint function so please suggest me the way to enable encryption & way to choose between SSE_SQS & SSE_KMS.
I tried with
busRegister.UsingAmazonSqs((context,cfg)=>{
cfg.Host("Region",x=>{
x.AccessKey("x");
x.SecreteKey("Y");
});
cfg.QueueAttributes.Add(QueueAttributeName.SqsManagedSseEnabled, "true");
cfg.QueueAttributes.Add(QueueAttributeName.KmsMasterKeyId, "alias/kmsid");
});
Share
Improve this question
asked Feb 15 at 5:32
DeeDee
1
1
- Please provide enough code so others can better understand or reproduce the problem. – Community Bot Commented Feb 16 at 0:37
1 Answer
Reset to default 0You can use a configure endpoints callback:
x.AddConfigureEndpointsCallback((name, cfg) =>
{
if (cfg is IAmazonSqsReceiveEndpointConfigurator configurator)
{
configurator.QueueAttributes.Add(QueueAttributeName.SqsManagedSseEnabled, "true");
configurator.QueueAttributes.Add(QueueAttributeName.KmsMasterKeyId, "alias/kmsid");
}
});