OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.97k stars 950 forks source link

MQTT client configuration is broken after #2672 #2827

Closed einarmo closed 2 weeks ago

einarmo commented 3 weeks ago

Type of issue

Current Behavior

Currently, any MQTT client configuration (like broker URL) provided when calling UaPubSubApplication.Create is ignored since client options are created here, but configuration isn't applied until here and here, which are in if != null guards, which will always stop the options from being recreated.

This makes pubsub essentially not work at all on both the client and server.

Expected Behavior

No response

Steps To Reproduce

  1. Configure a publisher or subscriber using UaPubSubApplication.Create, you can try setting a custom MQTT endpoint, like running a broker on a different port than 1883.
  2. Observe the logs, which will state Error while connecting host 'Unspecified/localhost:1883'

Environment

- OS: Linux
- Environment: Command line
- Runtime: .NET 8
- Nuget Version: 1.5.374.126-beta
- Component: Opc.Ua.PubSub
- Server: Custom server using this SDK
- Client: N/A

Anything else?

No response