How to fix an invalid user-defined conversion error?

I am working on setting up simple MQTT communication using ESP32 as a client with Arduino IDE. I am getting an invalid user-defined conversion error in client.subscribe part of the code (line 20), and I don't know what's wrong.

Error message:

invalid user-defined conversion from 'onConnectionEstablished()::<lambda(const String&, const String&)>' to 'uint8_t {aka unsigned char}' [-fpermissive]

My full code:

#include <WiFi.h>
#include <PubSubClient.h>

const char* ssid = "ssid";
const char* password = "password";
const char* mqttServer = "192.168.X.X";
const int mqttPort = 1883;

WiFiClient espClient;
PubSubClient client(espClient);
 
void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
}

void onConnectionEstablished() {
  client.subscribe("mytopic/test_one", [](const String & topic, const String & payload) {
    Serial.println(topic + ": " + payload);
  });

  client.publish("mytopic/test_two", "This is a message from the client");  
}

void loop() {
  client.loop();
}

Is this code based on something you found somewhere on the Internet? It sort of looks like you are trying to use a hybrid of client.subscribe() and client.setCallback(), but even then you're missing the length parameter in your lambda function.