I have created an AWS MSK Kafka Cluster using this tutorial
https://docs.aws.amazon.com/msk/latest/developerguide/msk-serverless-produce-consume.html
however, how can I connect a Laravel app on my local to the cluster where application 1 is the producer and application 2 is the consumer?
I came across this package
https://github.com/mateusjunges/laravel-kafka
but it doesn't say anything about connecting to a AWS MSK cluster.
MSK Serverless provides only IAM authentication mechanism.
AWS provides authentication lib for clients, which will work with Java-based clients, while Laravel is a PHP-based framework.
You would need to switch to provisioned MSK Cluster instead.
Once you switch, you can access MSK cluster's bootstrap information using the console or CLI or other APIs.
At the moment you have bootstrapping String, it is just an Apache Kafka, so create properties and follow Laravel documentation or that github integration project you've provided.
One thing you need to remember is to create MSK Security Group inbound rules for your machines/Security groups where client apps are running.
Please follow the security guidance.