{"id":15710512,"url":"https://github.com/aws/aws-corewcf-extensions","last_synced_at":"2025-10-20T04:30:17.766Z","repository":{"id":198061831,"uuid":"551251945","full_name":"aws/aws-corewcf-extensions","owner":"aws","description":"AWS CoreWCF Extensions is a collection of extension libraries for CoreWCF and WCF that provide cloud-native binding for Amazon SQS.","archived":false,"fork":false,"pushed_at":"2024-10-15T20:27:17.000Z","size":447,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-01-28T19:48:23.862Z","etag":null,"topics":["aws","aws-sqs","corewcf","wcf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aws.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-14T04:25:49.000Z","updated_at":"2024-11-13T21:49:20.000Z","dependencies_parsed_at":"2024-07-22T04:31:22.132Z","dependency_job_id":null,"html_url":"https://github.com/aws/aws-corewcf-extensions","commit_stats":null,"previous_names":["aws/aws-corewcf-extensions"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-corewcf-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-corewcf-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-corewcf-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aws%2Faws-corewcf-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aws","download_url":"https://codeload.github.com/aws/aws-corewcf-extensions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237261520,"owners_count":19281248,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-sqs","corewcf","wcf"],"created_at":"2024-10-03T21:08:22.522Z","updated_at":"2025-10-20T04:30:17.270Z","avatar_url":"https://github.com/aws.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS CoreWCF Server Extensions\n[![Build and Deploy](https://github.com/aws/aws-corewcf-extensions/actions/workflows/build-and-deploy.yml/badge.svg)](https://github.com/aws/aws-corewcf-extensions/actions/workflows/build-and-deploy.yml)\n\nAWS CoreWCF Extensions is a collection of extension libraries for CoreWCF and WCF that provide cloud-native binding for Amazon SQS.  \n\nThe AWS.CoreWCF.Extensions package contains async binding and transports for CoreWCF Services.\n\nThe AWS.WCF.Extensions package contains extensions for WCF Clients to send messages via a SQS transport.\n\n## Package Status\n\n| Package                                                                                      | NuGet Stable                                                                                     | Downloads                                                                                     |\n|:---------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------:|\n| [AWS.CoreWCF.Extensions](https://www.nuget.org/packages/AWS.CoreWCF.Extensions/) | [![AWS.CoreWCF.Extensions](https://img.shields.io/nuget/v/AWS.CoreWCF.Extensions.svg)](https://www.nuget.org/packages/AWS.CoreWCF.Extensions/) | [![AWS.CoreWCF.Extensions](https://img.shields.io/nuget/dt/AWS.CoreWCF.Extensions)](https://www.nuget.org/packages/AWS.CoreWCF.Extensions/) |\n| [AWS.WCF.Extensions](https://www.nuget.org/packages/AWS.WCF.Extensions/)                                 | [![AWS.WCF.Extensions](https://img.shields.io/nuget/v/AWS.WCF.Extensions.svg)](https://www.nuget.org/packages/AWS.WCF.Extensions/)                                 | [![AWS.WCF.Extensions](https://img.shields.io/nuget/dt/AWS.WCF.Extensions)](https://www.nuget.org/packages/AWS.WCF.Extensions/)\n\n## Getting Started\n\nFor a Full Example, see the [sample](./sample/README.md) app.\n### WCF Client\n\n* Add [**AWS.WCF.Extensions**](https://www.nuget.org/packages/AWS.WCF.Extensions) to your project as a Nuget Package.\n* Follow the example below to see how the library can be integrated into your application for to use SQS as the transport layer for a service.\n\n```csharp\n// this example assumes an existing wCF Service called ILoggingService\n\nvar sqsClient = new AmazonSQSClient();\n\nvar sqsBinding = new AWS.WCF.Extensions.SQS.AwsSqsBinding(sqsClient, queueName);\nvar endpointAddress = new EndpointAddress(new Uri(sqsBinding.QueueUrl));\nvar factory = new ChannelFactory\u003cILoggingService\u003e(sqsBinding, endpointAddress);\nvar channel = factory.CreateChannel();\n((System.ServiceModel.Channels.IChannel)channel).Open();\n\n// send a message via the wcf client\nchannel.LogMessage(\"Hello World\");\n```\n\n### CoreWCF Server\n\n* Add [**AWS.CoreWCF.Extensions**](https://www.nuget.org/packages/AWS.CoreWCF.Extensions) to your project as a Nuget Package.\n* Follow the example below to see how the library can be integrated into your application for to use SQS as the transport layer for a service.\n\n```csharp\nvar builder = WebApplication.CreateBuilder(args);\n\nbuilder.Services\n    .AddDefaultAWSOptions(new AWSOptions())\n    .AddServiceModelServices()\n    .AddQueueTransport()\n    .AddSQSClient(_queueName);\n\nvar app = builder.Build();\n\nvar queueUrl = app.EnsureSqsQueue(_queueName);\n\napp.UseServiceModel(services =\u003e\n{\n    services.AddService\u003cLoggingService\u003e();\n    services.AddServiceEndpoint\u003cLoggingService, ILoggingService\u003e(\n        new AwsSqsBinding(),\n        queueUrl\n    );\n});\n\napp.Run();\n```\n\n### CoreWCF.SQS Server Performance Tuning\n\nUsing Amazon SQS as a backplane for CoreWCF allows Servers to scale both horizontally and vertically.  Deploying a CoreWCF Server application to additional virtual machines or docker instances will increase overall message throughput, as well as improve resiliency, and does not require modification of the application code.  This is possible because Amazon SQS automatically handles multiple readers.\n\nIt's also possible to control the performance of an individual Server application.  Doing so may offer significant throughput or efficiency increases depending on the characteristics of your application and the host you're running on.\n\nA Server can be configured to use additional threads to process incoming messages and increase total throughput by setting the `ConcurrencyLevel` in the `AwsSqsBinding` constructor.  Setting this to a higher value allows multiple threads to deserilaize and ingest incoming messages as well as go through various extensibility points before CoreWCF dispatches the message for execution by the Service.\n\n_NOTE:_ This will only impact message ingestion and extensability.  It does not change the Service Dispatch concurrency strategy and will not change how many messages are processed by a Service concurrently.\n\n_NOTE:_ Setting this value above 10 will have no meaningful impact.  CoreWCF.SQS will read up to 10 messages in a batch from an Amazon SQS queue, and all messages must be processed before another batch is requested.  Increasing the Concurrency Level above 10 will leave any excess threads without any work to do.\n\nBelow is an example of increasing ConcurrencyLevel to increase message throughput:\n\n```\n/// \u003csummary\u003e\n/// Example of increasing ConcurrencyLevel\n/// \u003c/summary\u003e\npublic static void Main(string[] args)\n{\n    var inventoryServiceQueue = \"inventory\";\n\n    var builder = WebApplication.CreateBuilder(args);\n\n    // if needed, customize your aws credentials here,\n    // otherwise it will default to searching ~\\.aws\n    var awsCredentials = new AWSOptions();\n\n    builder.Services\n        .AddDefaultAWSOptions(awsCredentials)\n        .AddServiceModelServices()\n        .AddQueueTransport()\n        .AddSQSClient(inventoryServiceQueue);\n\n    var app = builder.Build();\n\n    var inventoryUrl = app.EnsureSqsQueue(inventoryServiceQueue);\n\n    app.UseServiceModel(services =\u003e\n    {\n        services.AddService\u003cInventoryService\u003e();\n        services.AddServiceEndpoint\u003cInventoryService, IInventoryService\u003e(\n            new AwsSqsBinding(concurrencyLevel: 6), // \u003c----- increase concurrencyLevel\n            inventoryUrl);\n    });\n\n    app.Run();\n}\n```\n\nA Server can also be configured to listen to multiple Amazon SQS Queues.  If expected traffic on several queues is expected to be light, enable one process to multiple queues can increase compute density and reduce operating costs.\n\nBelow is an example of a single Server listening to multiple Queues\n\n```\n/// \u003csummary\u003e\n/// Example of listening to multiple Queues\n/// \u003c/summary\u003e\npublic static void Main(string[] args)\n{\n    var inventoryServiceQueue = \"inventory\";\n    var orderProcessingServiceQueue = \"orderProcessing\";\n\n    var builder = WebApplication.CreateBuilder(args);\n\n    // if needed, customize your aws credentials here,\n    // otherwise it will default to searching ~\\.aws\n    var awsCredentials = new AWSOptions();\n\n    builder.Services\n        .AddDefaultAWSOptions(awsCredentials)\n        .AddServiceModelServices()\n        .AddQueueTransport()\n        .AddSQSClient(inventoryServiceQueue) // \u003c----- Add multiple SQS Clients\n        .AddSQSClient(orderProcessingServiceQueue);\n\n    var app = builder.Build();\n\n    var inventoryUrl = app.EnsureSqsQueue(inventoryServiceQueue);\n    var orderProcessingUrl = app.EnsureSqsQueue(orderProcessingServiceQueue);\n\n    app.UseServiceModel(services =\u003e\n    {\n        services.AddService\u003cInventoryService\u003e();\n        services.AddServiceEndpoint\u003cInventoryService, IInventoryService\u003e(\n            new AwsSqsBinding(), \n            inventoryUrl);\n\n        // Add multiple Service / ServiceEndpoints\n        services.AddService\u003cOrderProcessing\u003e();\n        services.AddServiceEndpoint\u003cOrderProcessing, IOrderProcessing\u003e(\n            new AwsSqsBinding(), \n            orderProcessingUrl);\n    });\n\n    app.Run();\n}\n```\n\n## Getting Help\n\nPlease use these community resources for getting help. We use the GitHub issues\nfor tracking bugs and feature requests.\n\n* If it turns out that you may have found a bug,\n  please open an [issue](https://github.com/aws/aws-corewcf-extensions/issues/new).\n  \n  \n## How to use this code?\n* Clone the Git repository.\n* Compile by running `dotnet build .`\n* Edit the solution by opening `AWS.CoreWCF.Extensions.sln` using Visual Studio or Rider.\n\n## Contributing\n\n* We welcome community contributions and pull requests. See\n[CONTRIBUTING](./CONTRIBUTING.md) for information on how to set up a development\nenvironment and submit code.\n\n# Additional Resources\n \n- [CoreWCF](https://github.com/CoreWCF/CoreWCF)\n- [WCF](https://github.com/dotnet/wcf)\n- [Amazon SQS](https://aws.amazon.com/sqs/)\n\n# License\n\nLibraries in this repository are licensed under the Apache 2.0 License.\n\nSee [LICENSE](./LICENSE) and [NOTICE](./NOTICE) for more information.  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Faws-corewcf-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faws%2Faws-corewcf-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faws%2Faws-corewcf-extensions/lists"}