docs: update the output of go and c# examples
This commit is contained in:
parent
d6284424b6
commit
8c368a6fa6
|
@ -111,11 +111,12 @@ namespace TMQExample
|
|||
catch (Exception e)
|
||||
{
|
||||
// handle other exceptions
|
||||
Console.WriteLine($"Failed to create native consumer, " +
|
||||
$"host: {_host}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
Console.WriteLine(
|
||||
$"Failed to create native consumer, " +
|
||||
$"host: {_host}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
throw;
|
||||
}
|
||||
|
||||
|
@ -163,11 +164,12 @@ namespace TMQExample
|
|||
catch (Exception e)
|
||||
{
|
||||
// handle other exceptions
|
||||
Console.WriteLine($"Failed to poll data, " +
|
||||
$"topic: {_topic}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
Console.WriteLine(
|
||||
$"Failed to poll data, " +
|
||||
$"topic: {_topic}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
throw;
|
||||
}
|
||||
// ANCHOR_END: subscribe
|
||||
|
@ -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,12 +207,13 @@ namespace TMQExample
|
|||
catch (Exception e)
|
||||
{
|
||||
// handle other exceptions
|
||||
Console.WriteLine($"Failed to execute seek example, " +
|
||||
$"topic: {_topic}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"offset: 0, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
Console.WriteLine(
|
||||
$"Failed to seek offset, " +
|
||||
$"topic: {_topic}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"offset: 0, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
throw;
|
||||
}
|
||||
// ANCHOR_END: seek
|
||||
|
@ -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}, " +
|
||||
|
|
|
@ -116,11 +116,12 @@ namespace TMQExample
|
|||
catch (Exception e)
|
||||
{
|
||||
// handle other exceptions
|
||||
Console.WriteLine($"Failed to create native consumer, " +
|
||||
$"host: {_host}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
Console.WriteLine(
|
||||
$"Failed to create native consumer, " +
|
||||
$"host: {_host}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
throw;
|
||||
}
|
||||
|
||||
|
@ -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,12 +211,13 @@ namespace TMQExample
|
|||
catch (Exception e)
|
||||
{
|
||||
// handle other exceptions
|
||||
Console.WriteLine($"Failed to execute seek example, " +
|
||||
$"topic: {_topic}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"offset: 0, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
Console.WriteLine(
|
||||
$"Failed to seek offset, " +
|
||||
$"topic: {_topic}, " +
|
||||
$"groupId: {_groupId}, " +
|
||||
$"clientId: {_clientId}, " +
|
||||
$"offset: 0, " +
|
||||
$"ErrMessage: {e.Message}");
|
||||
throw;
|
||||
}
|
||||
// ANCHOR_END: seek
|
||||
|
@ -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}, " +
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue