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

Access to Application Settings in MQTT Topic definition #12

Closed
ghost opened this issue Mar 10, 2019 · 2 comments
Closed

Access to Application Settings in MQTT Topic definition #12

ghost opened this issue Mar 10, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 10, 2019

Hi,

according to this document on Azure Functions Binding Syntax it should be possible to access the Application Settings of a Functions App by using the %AppSetting% syntax in the definition of a binding. Unfortunately this doesn't seem to work in my code which is implemented as follows:

[FunctionName("OnDeviceCreate")]
public static async Task OnDeviceCreate([MqttTrigger(typeof(TTNMqttConfigProvider), "%TTNAppID%/devices/+/events/create")] IMqttMessage message, ILogger logger)
{
    logger.LogInformation($"{DateTime.Now:g} Creation message for topic {message.Topic}");
    ....

Is there another way to access Application Settings from an MqttTrigger Binding Definition?

Thanks in advance!

@keesschollaart81
Copy link
Owner

I've just pushed a beta over v1.2.0 to MyGet. If you could test that, that would be great. Otherwise I'll release it in 2 days.

@ghost
Copy link
Author

ghost commented Mar 22, 2019

Hi,

your solution works like a charm and looks way more elegant than mine by the way. So I'm absolutetly fine with prefering your solution over mine!

@ghost ghost closed this as completed Mar 22, 2019
This issue was closed.
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

No branches or pull requests

1 participant