docs: update the output of go and c# examples

This commit is contained in:
t_max 2024-08-16 15:22:18 +08:00
parent d6284424b6
commit 8c368a6fa6
4 changed files with 42 additions and 35 deletions

View File

@ -111,7 +111,8 @@ namespace TMQExample
catch (Exception e)
{
// handle other exceptions
Console.WriteLine($"Failed to create native consumer, " +
Console.WriteLine(
$"Failed to create native consumer, " +
$"host: {_host}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -163,7 +164,8 @@ namespace TMQExample
catch (Exception e)
{
// handle other exceptions
Console.WriteLine($"Failed to poll data, " +
Console.WriteLine(
$"Failed to poll data, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -186,13 +188,14 @@ namespace TMQExample
{
consumer.Seek(new TopicPartitionOffset(topicPartition.Topic, topicPartition.Partition, 0));
}
Console.WriteLine("Assignment seek to beginning successfully");
}
catch (TDengineError e)
{
// handle TDengine error
Console.WriteLine(
$"Failed to execute seek example, " +
$"Failed to seek offset, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -204,7 +207,8 @@ namespace TMQExample
catch (Exception e)
{
// handle other exceptions
Console.WriteLine($"Failed to execute seek example, " +
Console.WriteLine(
$"Failed to seek offset, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -240,7 +244,7 @@ namespace TMQExample
{
// handle TDengine error
Console.WriteLine(
$"Failed to execute commit example, " +
$"Failed to commit offset, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -253,7 +257,7 @@ namespace TMQExample
{
// handle other exceptions
Console.WriteLine(
$"Failed to execute commit example, " +
$"Failed to commit offset, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +

View File

@ -116,7 +116,8 @@ namespace TMQExample
catch (Exception e)
{
// handle other exceptions
Console.WriteLine($"Failed to create native consumer, " +
Console.WriteLine(
$"Failed to create native consumer, " +
$"host: {_host}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -191,13 +192,14 @@ namespace TMQExample
{
consumer.Seek(new TopicPartitionOffset(topicPartition.Topic, topicPartition.Partition, 0));
}
Console.WriteLine("Assignment seek to beginning successfully");
}
catch (TDengineError e)
{
// handle TDengine error
Console.WriteLine(
$"Failed to execute seek example, " +
$"Failed to seek offset, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -209,7 +211,8 @@ namespace TMQExample
catch (Exception e)
{
// handle other exceptions
Console.WriteLine($"Failed to execute seek example, " +
Console.WriteLine(
$"Failed to seek offset, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -245,7 +248,7 @@ namespace TMQExample
{
// handle TDengine error
Console.WriteLine(
$"Failed to execute commit example, " +
$"Failed to commit offset, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +
@ -258,7 +261,7 @@ namespace TMQExample
{
// handle other exceptions
Console.WriteLine(
$"Failed to execute commit example, " +
$"Failed to commit offset, " +
$"topic: {_topic}, " +
$"groupId: {_groupId}, " +
$"clientId: {_clientId}, " +

View File

@ -112,7 +112,7 @@ func main() {
}, 0)
if err != nil {
log.Fatalf(
"Failed to execute seek example, topic: %s, groupId: %s, clientId: %s, partition: %d, offset: %d, ErrMessage: %s\n",
"Failed to execute seek offset, topic: %s, groupId: %s, clientId: %s, partition: %d, offset: %d, ErrMessage: %s\n",
topic,
groupID,
clientID,

View File

@ -130,7 +130,7 @@ func main() {
}, 0)
if err != nil {
log.Fatalf(
"Failed to execute seek example, topic: %s, groupId: %s, clientId: %s, partition: %d, offset: %d, ErrMessage: %s\n",
"Failed to seek offset, topic: %s, groupId: %s, clientId: %s, partition: %d, offset: %d, ErrMessage: %s\n",
topic,
groupID,
clientID,