Skip to content

Feature Request: EventHubTrigger #28

@mniehoff

Description

@mniehoff

The Event Hub Trigger does not yet work.

Error Message in the local environment:

info: Worker.Java.fe7e29b7-c013-4369-b4db-0071d7e171e6[0]
      Start Process: /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/bin/java  -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 "/Users/matthiasniehoff/.azurefunctions/bin/workers/Java/azure-functions-java-worker.jar" --host 127.0.0.1 --port 55575 --workerId fe7e29b7-c013-4369-b4db-0071d7e171e6 --requestId fb3e5e92-d9dc-4ecd-bb18-fadec311afb5
[02.11.17 10:54:06] Generating 0 job function(s)
[02.11.17 10:54:06] Starting Host (HostId=matthiasmacbookpro-1212839178, Version=2.0.11308.0, ProcessId=11064, Debug=False, Attempt=0)
[02.11.17 10:54:06] No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
info: Worker.Java.fe7e29b7-c013-4369-b4db-0071d7e171e6[0]
      Listening for transport dt_socket at address: 5005
[02.11.17 10:54:06] Job host started
[02.11.17 10:54:06] The following 1 functions are in error:
[02.11.17 10:54:06] hello: Object reference not set to an instance of an object.
[02.11.17 10:54:06] 
[02.11.17 10:54:06] 
info: Worker.Java.fe7e29b7-c013-4369-b4db-0071d7e171e6[0]
      Microsoft Azure Functions Java Runtime [build 1.1-SNAPSHOT]
info: Worker.Java.fe7e29b7-c013-4369-b4db-0071d7e171e6[0]
      [INFO] {com.microsoft.azure.webjobs.script.handler.MessageHandler.handle}: message generated by "class com.microsoft.azure.webjobs.script.rpc.messages.StartStream$Builder"
Listening on http://localhost:7071/
Hit CTRL-C to exit...
[02.11.17 10:54:06] Host lock lease acquired by instance ID '0000000000000000000000003BDBF0D9'.

Error Message when deployed:

Function ($hello) Error: Object reference not set to an instance of an object.

My Function:

    @FunctionName("hello")
    public String hello(@EventHubTrigger(name = "req", eventHubName = "event-hub", connection = "ReceiverConnectionString", consumerGroup = "es-function") String req,
                        ExecutionContext context) {
        return String.format("Hello, %s!", req);
    }

My local.settings.json

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=...",
    "AzureWebJobsDashboard": "DefaultEndpointsProtocol=https;AccountName=...",
    "ReceiverConnectionString": "Endpoint=....."
  },
  "bindings": [
    {
      "type": "eventHubTrigger",
      "name": "req",
      "direction": "in",
      "path": "event-hub",
      "connection": "ReceiverConnectionString",
      "consumerGroup": "es-function"
    }
  ]
}

Did I something wrong is it not yet supported by now?

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions