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

eventhub.Receive function gives no such file or directory instead of creating one #280

Open
sariburak opened this issue Dec 1, 2022 · 0 comments

Comments

@sariburak
Copy link

Setup

I first create a FilePersister and Hub by the following code:

persister, err := persist.NewFilePersister(output)
if err != nil {
	// error handle
}
hub, err := eventhub.NewHubFromConnectionString(conn_str, eventhub.HubWithOffsetPersistence(persister))
if err != nil {
	//error handle
}
t.hub = hub

and then try to fetch data from EventHub like this:

for _, partitionID := range partitionIDs {
    _, err := t.hub.Receive(ctx, partitionID, handler, eventhub.ReceiveWithConsumerGroup('$Default'))
    if err != nil {
        // err handle
    }
}

However. hub.Receive gives no such file or directory error.

Expected Behavior

FilePersister file should be automatically created.

Actual Behavior

gives no such file or directory error.

Environment

  • OS: macOS Ventura
  • Go version: go version go1.19.1 darwin/arm64
  • Version of Library: 3.3.20

Additional Notes

I tried to run the code in a docker container. I built the code and copied the binary into a docker container which is running on golang:alpine. In that case, code run without any problems. So that's interesting.

Also, in my local run, I am sure the output dir has all the permission it needs.

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