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

SDK does not call callback #105

Closed
douglasqueirozalmeida opened this issue Jun 19, 2024 · 2 comments
Closed

SDK does not call callback #105

douglasqueirozalmeida opened this issue Jun 19, 2024 · 2 comments

Comments

@douglasqueirozalmeida
Copy link

douglasqueirozalmeida commented Jun 19, 2024

Expected Behavior

When use a batch of 10 events or 30 millisec, when the quantity or time is reached the SDK should trigger the callback for each event that was added.

Current Behavior

I am using a batch of 10 events or 30 millisec (or other values), when the quantity or time is reached the SDK triggers the callback (onLogEventServerResponse) only once.

Steps to Reproduce

  private val callBackAmplitude = object : AmplitudeCallbacks() {
      override fun onLogEventServerResponse(event: AmplitudeEvent, status: Int, message: String?) {
        logger.warn("Status: $status - Message: $message - Event: $event")
      }
    }

 val client = Amplitude.getInstance().also {
    it.init(apiKey)
    it.setEventUploadThreshold(10)
    it.setEventUploadPeriodMillis(30000)
    it.useBatchMode(true)
    it.setCallbacks(callBackAmplitude)
  }
 client.logEvent(event)

Environment

  • implementation 'com.amplitude:java-sdk:1.12.0'
@douglasqueirozalmeida
Copy link
Author

@izaaz can you help?

@douglasqueirozalmeida
Copy link
Author

Guys, sorry for the issue, there is no problem, the SDK works correctly.
It would be interesting to add documentation stating that any error that occurs in the callback will not be propagated. This happens due to the thread that the SDK runs.

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