- ERs sometimes took too long to receive a message.
Setting kafkaGroupID to "" prevents this.
- Kafka reader took 10s to close (default MaxWait).
Set MaxWait to 1ms.
- Exporters took 1s each to export due to BatchSize
not being hit. Set BatchSize to 1 to prevent it.
Avoids the default 1 second delay when the batch doesn't
reach 100 messages within that time.
Useful when the Kafka exporter is not cached, as it would
otherwise encounter that delay. Setting BatchSize to 1
prevents this.
- added extra error return parameter to constructor
- failing to parse PEM certificates returns an error (previously nil
return)
- moved Connect logic inside the constructor*
- removed unnecessary fields from poster structure. Use the
configuration fields directly instead.
- removed mutex from poster structure (kafka writer is thread-safe)
- removed nil writer check. Message is exported directly.
- shortened receiver name
(https://google.github.io/styleguide/go/decisions#receiver-names)
*The Kafka Transport is not a connection but a configuration for the
connection created during the first export. The connection and its
related goroutines stay running until manually closed.
- Updated to use the test suite
- Deleted kafka_ssl sample configuration (moved to test file)
- Replaced 'logger' section with 'general' in configuration
- Revised Kafka server SSL setup comment
- Ensured exporters are synchronous to avoid missing errors
- Implemented helper function to create and clean up kafka topics
The *transfer_balance action can now use a reference value to ensure
the destination balance reaches a specified amount. If the destination
balance exceeds the reference value, the excess is transferred back
to the source balance. If the destination balance is below the
reference value, the required amount is transferred from the source
balance to the destination balance to reach the specified reference
value. An error is returned if the transfer cannot achieve the
specified reference value.
Used by specifying DestinationReferenceValue inside ExtraParameters.
Other *transfer_balance changes:
- used json tags when unmarshaling ExtraParameters in order to be
able to shorten the names of the fields
- lock the destination account only if it's different from the
source account. It is still passed to the Guard function but
without a lock key and with 0 timeout.
- if the transfer happens within the same account, update the
account and execute its ActionTriggers only once.
- moved transfer units validation after retrieving/creating the
destination balance
*cdrlog action has been updated to create cdrs for reference
*transfer_balance actions, although improvements are needed and
the functionality is not completely tested.
APIerSv1.TransferBalance has been updated to take into account the
ReferenceValue parameter.
Added new *transfer_balance action unit tests to account for the
new changes.
Added integration tests (incomplete for now, but functionality
has been tested manually).
- shortened the failed post cache ttl to 1ms to simulate with more
than one events file
- use the default FailedPath (which is the same as SourcePath) to check
whether writing events that failed to be replayed to the same path
would cause an infinite loop.
- renamed parameter type: ArgsReplyFailedPosts -> ReplayFailedPostsParams
- renamed param fields:
- FailedRequestsInDir -> SourcePath
- FailedRequestsOutDir -> FailedPath
- changed param fields types from *string to string
- used the SourcePath and FailedPath params directly instead of creating separate variables
- used filepath.WalkDir instead of reading the directory and looping over the entries
- used slices.ContainsFunc to check if the file belongs to any module (if 1+ is specified)
- used filepath.Join instead of path.Join
- used the path provided by WalkFunc instead of building the file paths ourselves
- made error returns more descriptive
- added logs for directories/files that are skipped
- paths that cannot be accessed are skipped after logging the error
- Pass the testing.T variable to all the helpers.
- Fail directly using t.Fatal instead of returning errors and
checking them in the parent function.
- Use t.Cleanup to ensure engine is closed after the test instead
of returning a shutdown function and using it with defer.
- Use t.TempDir to create temporary directories for configuration
and tariffplans
- Add t.Helper() method call to all helper functions.
200 -> 16
Previously, considering the fibonacci back off strategy, if engine failed to
start it would have tried to attempt connections for 2.862799e+33 years.
Now, the amount of attempts is 16, equivalent to around 2 and a half seconds.
Should be more than enough, considering that usually 6-7 attempts are enough.