最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Masstransit- how to enable Encryption for amazon queue without using ReceiveEndpoint function - Stack Overflow

programmeradmin3浏览0评论

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
Add a comment  | 

1 Answer 1

Reset to default 0

You 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");
    }
});
发布评论

评论列表(0)

  1. 暂无评论