Skip to content
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

Fixes #2126 - Adds configuration of upstream protocol in cloud based mode #2129

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Metal-Mighty
Copy link

PR for issue #2126

What is being addressed

Adds the ability to configure the Upstream Protocol for AMQP communication between Azure Device Clients and Azure IoT Hub in cloud-based mode.

This setting was present in the edgeHub module when not in cloud-based mode and the LNS forced communication in AMQP TCP, which uses different port than AMQP WS and can break in restricted network environments.

How is this addressed

  • Adds an UPSTREAM_PROTOCOL environment variable and an UpstreamProtocol property in the LNS configuration
  • Adds an extension method and enum with supported options (Amqp or AmqpWs)
  • Initializes the LoRaDeviceClient with the selected protocol, with AMQP TCP (Amqp) the default value (same as before)

@Metal-Mighty Metal-Mighty force-pushed the bugfix/2126-upstreamprotocol branch 3 times, most recently from 090eead to e4db540 Compare May 30, 2024 12:59
Currently supports Amqp or AmqpWs
Amqp was the default protocol in cloud-based mode before, keeping it the same for compatibility
@Metal-Mighty Metal-Mighty force-pushed the bugfix/2126-upstreamprotocol branch from e4db540 to c013efd Compare May 30, 2024 13:04
@Metal-Mighty
Copy link
Author

@microsoft-github-policy-service agree company="Michelin"

@Metal-Mighty Metal-Mighty marked this pull request as ready for review June 28, 2024 07:11
@Mandur
Copy link
Contributor

Mandur commented Sep 22, 2024

We cannot run the CI on this branch, therefore it is not possible to merge it at the moment. I am currently in travel I will have a look when I come back

@@ -10,7 +10,7 @@ namespace LoRaWan.Tests.Unit.NetworkServer
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using LoRaWan.NetworkServer;
using LoRaWan.NetworkServer.Extensions;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to revert this change to have it compiled

@@ -5,7 +5,7 @@ namespace LoRaWan.Tests.Unit.NetworkServer
{
using System;
using System.Threading;
using LoRaWan.NetworkServer;
using LoRaWan.NetworkServer.Extensions;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to revert this change to have it compiled

@Mandur
Copy link
Contributor

Mandur commented Oct 9, 2024

There is still a problem with our CI to accept the external change - however when running the PR locally in addition to the code changes I see some tests failing:

image

@Metal-Mighty
Copy link
Author

Hi @Mandur Thanks for the feedback. Weird about the revert, we have a working build on our environment. It's true I didn't check the unit tests though !
I'll work on it asap and keep you updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants