Skip to content

Commit

Permalink
Catch IOException
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffxiang committed Oct 23, 2024
1 parent e2190ef commit f85ae75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
import com.pinterest.psc.serde.IntegerSerializer;
import com.pinterest.psc.serde.StringSerializer;

import java.io.IOException;

public class ExamplePscProducer {

private static final PscLogger logger = PscLogger.getLogger(ExamplePscProducer.class);
private static final int NUM_MESSAGES = 10;

public static void main(String[] args) throws ConfigurationException, ProducerException {
public static void main(String[] args) throws ConfigurationException, ProducerException, IOException {
if (args.length < 1) {
logger.error("ExamplePscProducer needs one argument: topicUri");
return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.pinterest.psc.example.migration.producer;

import java.io.IOException;
import java.util.concurrent.atomic.AtomicInteger;

import com.pinterest.psc.config.PscConfiguration;
Expand All @@ -11,7 +12,7 @@

public class Psc {

static public void main(String[] args) throws ConfigurationException, ProducerException {
static public void main(String[] args) throws ConfigurationException, ProducerException, IOException {
String topicUri = "plaintext:/rn:kafka:dev:local-cloud_local-region::local-cluster:my_test_topic";

PscConfiguration pscConfiguration = new PscConfiguration();
Expand Down

0 comments on commit f85ae75

Please sign in to comment.