Last active
March 14, 2019 15:37
-
-
Save recursivecodes/c7e57f2d92bf269516362fbe7e6fb8f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ConfigFileAuthenticationDetailsProvider provider = new ConfigFileAuthenticationDetailsProvider('/path/to/.oci/config', 'DEFAULT') | |
| StreamClient client = new StreamClient(provider) | |
| String key = 'Key' | |
| String msg = 'Message' | |
| PutMessagesDetails putMessageDetails = PutMessagesDetails.builder() | |
| .messages([ | |
| PutMessagesDetailsEntry.builder() | |
| .key(key.getBytes(Charset.forName("UTF-8"))) | |
| .value(msg.getBytes(Charset.forName("UTF-8"))) | |
| .build() | |
| ]) | |
| .build() | |
| PutMessagesRequest putMessageRequest = PutMessagesRequest.builder() | |
| .streamId(this.streamId) | |
| .putMessagesDetails(putMessageDetails) | |
| .build() | |
| client.putMessages(putMessageRequest) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment